Created
August 3, 2020 13:18
-
-
Save pecuchet/86ff2a1d3c0807c3253b018d7c6bd105 to your computer and use it in GitHub Desktop.
A collection of js regular expressions.
This file contains hidden or 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
// Password validation | |
const length = 12, | |
pattern = `^(?=.*[a-zA-Z])(?=.*\\d)(?=.*[*!$€£#%&|_\\-@"'(§^¨{})\\[\\]´\`~+=:;,.?<>]).{${length},}$`, | |
regex = new RegExp(pattern); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment