Skip to content

Instantly share code, notes, and snippets.

@tanpld
Last active October 20, 2022 18:50
Show Gist options
  • Save tanpld/1891bde9fe67b68e32aa024195e2ac0e to your computer and use it in GitHub Desktop.
Save tanpld/1891bde9fe67b68e32aa024195e2ac0e to your computer and use it in GitHub Desktop.
Password regex
/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z])(?=.*[*.!@$%^&(){}[\]\:\;\<\>\,\.\?\/\~\_\+\-\=\|\\]).{8,32}$/gm
At least one digit [0-9]
At least one lowercase character [a-z]
At least one uppercase character [A-Z]
At least one special character [*.!@#$%^&(){}[]:;<>,.?/~_+-=|\]
At least 8 characters in length, but no more than 32.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment