Can anyone help me in writing a regular expression on the following description?
The password contains characters from at least three of the following five categories:
- English uppercase characters (A – Z)
- English lowercase characters (a – z)
- Base 10 digits (0 – 9)
- Non-alphanumeric (For example: !, $, #, or %)
- Unicode characters
The minimum length of the password is 6.
Better way to deal this is to split each of the conditions and have a regex for each of the condition. Then count how many have been satisfied for entered password. In this way you can even tell user if the password is average, meets criteria or a very strong password.
Not sure how to match unicode characters using regex. Rest all conditions are available above.