To get started, download RegexPKG.
npm install regexpkg
Next, you can start using the API.
const regexpkg = require('regexpkg')
console.log(regexpkg.getAllRegexes()) // logs all the regexes in the library
console.log(regexpkg.test('String', '"Hello, World!"')) // returns true or false wether the regex matching the name matches the string.
console.log(regexpkg.Regex[<name>]) // Get a regex by name
console.log(regexpkg.Regex.<name>) // Get a regex by name
-
Number
Matches a number/multiple numbers.
-
String
Matches anything in between quotes.
-
Symbol
Matches any symbol
-
Email
Matches an email
-
Text
Matches a line of text
-
IPV4
Matches an IPV4 ip.
-
IPV6
Matches an IPV6 ip.
-
PhoneNumber
Matches a phone number
-
Password
Matches a password with at least one lowercase letter, at least 1 uppercase letter, at least 1 number, at least 1 symbol, and that is 8 characters long.