
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
regexpattern-collection
Advanced tools
A simple Javascript & TypeScript module of Regex Pattern Collection for String Validation
A simple Javascript & TypeScript module of Regex Pattern Collection for String Validation
npm i regexpattern-collection
const { RegexValidation, RegexPattern } = require("regexpattern-collection").default;
RegexValidation.hasMatch("yourcrush@mail.com", RegexPattern.email);//true
RegexValidation.hasMatch("yourcrush", RegexPattern.email);//false
import { RegexValidation, RegexPattern } from "regexpattern-collection"
RegexValidation.hasMatch("yourcrush@mail.com", RegexPattern.email);//true
Pattern | Type | Description |
---|---|---|
RegexPattern.email | ||
RegexPattern.userName | Username | that may include _ and – having a length of 3 to 16 characters |
RegexPattern.url | Url | Url that contains http/https |
RegexPattern.numberOnly | Number Only | only contains numbers |
RegexPattern.decimalNumber | Decimal Number | only contains decimal |
RegexPattern.htmltag | HTML Tag | only contains html tag |
RegexPattern.htmltag | MD5 Hash | only contains md5 |
RegexPattern.bitcoinaddress | Bitcoin Address | only contains bitcoin address |
RegexPattern.ipaddress | IP Address | only contains ip address |
RegexPattern.ipv4address | IPV4 Address | only contains ipv4 address |
RegexPattern.ipv6address | IPV6 Address | only contains ipv6 address |
RegexPattern.date | Date | will match a string as a date in the formats M/D/YY, M/D/YYY, MM/DD/YY, and MM/DD/YYYY |
RegexPattern.time12hours | Time 12 Hours | Time Format HH:MM 12-hour, optional leading 0 |
RegexPattern.time24hours | Time 24 Hours | Time Format HH:MM 24-hour, optional leading 0 |
RegexPattern.duplicateString | Duplicate String | duplicate string |
RegexPattern.slug | Slug | slug |
RegexPattern.passport | Passport | passport |
RegexPattern.passwordComplex | Password Complex | Should have 1 lowercase letter, 1 uppercase letter, 1 number, 1 special character and be at least 8 characters long |
RegexPattern.passwordModerate | Password Moderate | Should have 1 lowercase letter, 1 uppercase letter, 1 number and be at least 8 characters long |
RegexPattern.filenameWithExtension | File Name With Extension | support all extension (mp4, mp3, wav, png, jpg, gif, etc.) |
RegexPattern.imageExtension | Image Extension | jpeg,jpg,gif,png,bmp |
RegexPattern.audioExtension | Audio Extension | mp3,wav,wma,amr,ogg |
RegexPattern.videoExtension | Video Extension | mp4,avi,wmv,rmvb,mpg,mpeg,3gp |
RegexPattern.pdfExtension | PDF Extension | |
RegexPattern.binary | Binrary | binary numbers |
RegexPattern.currency | Currency | country currency |
FAQs
A simple Javascript & TypeScript module of Regex Pattern Collection for String Validation
We found that regexpattern-collection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.