vicky chauhan wrote:Yes.. I have to use it in a single regular expression...
I am not able to get the "atleast three out of 5" part!!
vicky chauhan wrote:
• Unicode characters
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
vicky chauhan wrote:
4) All special characters which are allowed in a password (!, @, #, $, %, &) (I remember I read somewhere that all are not valid.. but don't know that was right or wrong)
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
vicky chauhan wrote:Thanks James.
I rechecked the specifications and "\W" is allowed.
Password should be atleast 8 character long and should have atleast 3 of the following four: uppercase letters, lowercase letters, numerics and non alphanumeric ("/w")
The expression I came up is:
(?=^.{8,}$)((?=.*\d)(?=.*\W+)(?=.*[A-Z]))|((?=.*\d)(?=.*\W+)(?=.*[a-z]))|((?=.*\W+)(?=.*[A-Z])(?=.*[a-z]))|((?=.*\d)(?=.*[A-Z])(?=.*[a-z]))(?![.\n]).*$”;
But I was looking for something still less complex and small
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
That is a really big piece of pie for such a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|