Strong Password Regular Expression

A regular expression that matches strong (security) password strings.

  • Minimum 6 characters
  • At least 1 upper case English letter
  • At least 1 lower case English letter
  • At least 1 letter
  • At least 1 special character
/^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/

Strong Password Example:

See Also: