Last active
June 16, 2020 17:57
-
-
Save cleonps/1507acead5c372159ac6e24239023709 to your computer and use it in GitHub Desktop.
Regular Expressions
This file contains 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
// RFC.re - Regular expression for "Registro Federal de Contribuyentes" validation | |
^[A-Za-zÑñ&]{3,4}[0-9]{2}[0-1][0-9][0-3][0-9][A-Za-z0-9]{2}[0-9Aa]$ |
This file contains 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
// Sean Allen's Regex for email | |
[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64} | |
// Lea Verou's Regex for email (https://www.youtube.com/watch?v=M7vDtxaD7ZU&t=1h07m42s) | |
// TL;DW: Practicality > Precision | |
^\S+@\S+\.\S+$ |
This file contains 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
/* | |
Sean Allen's Regex for password | |
Regex restricts to 8 character minimum, 1 capital letter, 1 lowercase letter, 1 number | |
If you have different requirements a google search for "password requirement regex" will help | |
*/ | |
(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{8,} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment