Skip to content

Instantly share code, notes, and snippets.

@KRostyslav
Created April 29, 2022 11:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KRostyslav/b639a629a9d665f2c0b0e802d9a9d03a to your computer and use it in GitHub Desktop.
Save KRostyslav/b639a629a9d665f2c0b0e802d9a9d03a to your computer and use it in GitHub Desktop.
RegEx
# Password (min 8 symbols, with spec symbols)
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#\$%\^&\*])(?=.{8,})/
# Password (8-12 symbols, without spec symbols)
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,12})/
# Percent (0 .. 100)
/^([0-9]{1,2}){1}(\.[0-9]*)?$|^(100)$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment