Skip to content

Instantly share code, notes, and snippets.

@koomai
Last active October 19, 2022 06:46
Show Gist options
  • Save koomai/09d0873e5e2d0b570c54 to your computer and use it in GitHub Desktop.
Save koomai/09d0873e5e2d0b570c54 to your computer and use it in GitHub Desktop.
Regex.js
// 8-24 length with at least 1 uppercase letter, 1 number and 1 special character
((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[`~!@#$%^&*()_+\-{}\[\]|\\:;'",./<>?]).{8,24})
// 8-24 length with at least 1 uppercase letter, 1 number OR special character
/((?=.*[a-z])(?=.*[A-Z])(?=.*[\d`~!@#$%^&*()_+\-{}\[\]|\\:;'",./<>?]).{8,24})/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment