rodrigosantosbr

Password Regex

Jan 15th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!

Password Regular expression:


Site: https://regex101.com/


Password must contain at least one letter, at least one number, and be longer than six charaters.

Expression:

^(?=.*[0-9]+.*)(?=.*[a-zA-Z]+.*)[0-9a-zA-Z]{6,}$

Example text:

198633
Pedro
P3dro
P3droM

The password's first character must be a letter, it must contain at least 4 characters and no more than 15 characters and no characters other than letters, numbers and the underscore may be used

Expression:

^[a-zA-Z]\w{3,14}$

Example text:

198633
Pedro
P3dro
P3droM
Abcdefghijklmno
Abcdefghijklmnopa

Password must be at least 4 characters, no more than 8 characters, and must include at least one upper case letter, one lower case letter, and one numeric digit.

Expression:

^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$

Example text:

198633
Pedro
pedro
P3dro
Add Comment
Please, Sign In to add comment