Im working on javascript regex which includes having following conditions. So far with no luck.
-The minimum character count allowed is 8.
-The maximum character count allowed is 64.
-The entered text should include at least two of the following - numbers, lowercase letters, uppercase letters, Special characters.
-Entering symbols will not be supported.
So far what I have is this @anubhava answer here.
^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,63}$
This regex will enforce these rules:
-At least one upper case English letter, (?=.*?[A-Z])
-At least one lower case English letter, (?=.*?[a-z])
-At least one digit, (?=.*?[0-9])
-At least one special character, (?=.?[#?!@$%^&-])
-Minimum eight in length .{8,63} (with the anchors)
My Question is how do I satify my 3rd and 4th conditions Which is :-
-The entered text should include at least two of the following - numbers, lowercase letters, uppercase letters, Special characters.
-Entering symbols will not be supported.
Any help would be appreciated.