Last active
April 21, 2020 22:57
-
-
Save imjakechapman/d2c95bae144aa1ba85a2b167e9499bea to your computer and use it in GitHub Desktop.
Password Complexity Regex'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
// 8 characters minium. 1 uppercase character, 1 lowercase character, 1 number, 1 special character | |
const strongRegex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/; | |
// 6 characters minium. 1 uppercase character, 1 lowercase character, 1 number | |
const mediumRegex = /^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment