Skip to content

Instantly share code, notes, and snippets.

@jerriclynsjohn
Created July 18, 2019 07:28
Show Gist options
  • Save jerriclynsjohn/4d48c924b1be8b167786d2b7aaa8bdbf to your computer and use it in GitHub Desktop.
Save jerriclynsjohn/4d48c924b1be8b167786d2b7aaa8bdbf to your computer and use it in GitHub Desktop.
Strong password Regular Expression
  • Passwords will contain at least 1 upper case letter
  • Passwords will contain at least 1 lower case letter
  • Passwords will contain at least 1 number or special character
  • There is no length validation (min, max) in this regex!

Regular expression for JavaScript:

/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment