Last active
July 29, 2020 21:08
-
-
Save ChukwuEmekaAjah/69f3ac826bc03bb96d3fc3164e39da4e to your computer and use it in GitHub Desktop.
A list of common regular expression patterns implemented in every day programming work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let dayRegex = /^(([0-2]?[1-9])|([3][0-1]))$/; //01-31 | |
let monthRegex = /^(([0]?[1-9])|([1][0-2]))$/; //01-12 | |
let emailRegex = /^\S*?@\S*?\.[a-z]{2,3}^/; | |
let lessThanTen = /^[0]?[1-9]?$/ // 1-9, 01-09 | |
let percentRegex = /^([1-9][0-9]?)$|(^100$)/ // 1-100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment