I want a regular expression for a string for password that contain at least three out of the following four types of characters:
- English lowercase characters (a through z).
- ENGLISH UPPERCASE CHARACTERS (A THROUGH Z).
- Base 10 digits (0 through 9).
- Non alphanumeric characters (e.g. !,$,#,%).
And should contain at least 8 character.
Correct answer of my question :
regular Expression :
^((?=.[\d])(?=.[a-z])(?=.[A-Z])|(?=.[a-z])(?=.[A-Z])(?=.[^\w\d\s])|(?=.[\d])(?=.[A-Z])(?=.[^\w\d\s])|(?=.[\d])(?=.[a-z])(?=.[^\w\d\s])).{8,30}$
Thanks.