hi forum...
i am in bad need to find out a regular expression... pls help
condition is regular expression is for password validation
conditions:
o 6 or more characters with mix of any 2 below
§ Upper case
§ Lower case
§ Number
§ Special character
I can't figure out a simpler solution
(?x-i)(?= (?: ([A-Z])|([a-z])|(\d)|(\W) ) (?(1)(?=.*(?:(?2)|(?3)|(?4)))) (?(2)(?=.*(?:(?1)|(?3)|(?4)))) (?(3)(?=.*(?:(?1)|(?2)|(?4)))) (?(4)(?=.*(?:(?1)|(?2)|(?3))))).{6,}
I can't say this is any simpler but here's one I used:
(?=.{6})(?:(?=.*[A-Z])(?=.*[a-z])|(?=.*[A-Z])(?=.*\d)|(?=.*[A-Z])(?=.*[^A-Za-z\d])|(?=.*[a-z])(?=.*\d)|(?=.*[a-z])(?=.*[^A-Za-z\d])|(?=.*\d)(?=.*[^A-Za-z\d])).*