1.0.8 • Published 1 year ago

gen-regex v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

gen-regex

Intro

Installation

npm install gen-regex

Usage

Step 1

Import package in your node js project

const regex = require('gen-regex');

Step 2

After import, use the created instance throughout your project by passing the parameters for which you have to create the regex pattern

const pattern = regex('mail');

or

const pattern = regex('pan');

Supported Parameters

You can find the parameters to use in function in below table.

ParameterUsageOutput
mailregex('mail')^a-zA-Z0-9._%+-+@a-zA-Z0-9.-+.a-zA-Z{2,10}$
panregex('pan')^a-zA-Z{5}0-9{4}a-zA-Z{1}$
aadharregex('aadhar')^2-9{1}0-9{3}0-9{4}0-9{4}$
gstregex('gst')^0-9{2}A-Z{5}0-9{4}A-Z{1}1-9A-Z{1}Z0-9A-Z{1}$

Currently, We focussed on these 4 primary patterns which are widely use in India. And we are working on improving this module.

1.0.8

1 year ago

0.0.1

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago