mirror of
https://github.com/ziishaned/learn-regex.git
synced 2025-10-03 09:12:37 -04:00
Merge d675cd4254bc5464603d5ba1acfcbecb375e9094 into c1cfb1e6fe30d455b5b28bddc95562c9e60cf471
This commit is contained in:
commit
6eaba77dfa
@ -483,6 +483,7 @@ line. And because of `m` flag now regular expression engine matches pattern at t
|
||||
* *Lowercase letters only*: `^([a-z])*$`
|
||||
* *Uppercase letters only*: `^([A-Z])*$`
|
||||
* *URL*: `^(((http|https|ftp):\/\/)?([[a-zA-Z0-9]\-\.])+(\.)([[a-zA-Z0-9]]){2,4}([[a-zA-Z0-9]\/+=%&_\.~?\-]*))*$`
|
||||
See more: [In search of the perfect URL validation regex](https://mathiasbynens.be/demo/url-regex)
|
||||
* *VISA credit card numbers*: `^(4[0-9]{12}(?:[0-9]{3})?)*$`
|
||||
* *Date (MM/DD/YYYY)*: `^(0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])[- /.](19|20)?[0-9]{2}$`
|
||||
* *Date (YYYY/MM/DD)*: `^(19|20)?[0-9]{2}[- /.](0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])$`
|
||||
|
Loading…
x
Reference in New Issue
Block a user