c# - Password RegExpression -
i have following requirements password field "the password must contain least 1 out of 4 groups: upper case, lower case, number, special character" please help
^(?=.*[a-z]{1,})(?=.*[a-z]{1,})(?=.*[0-9]{1,})(?=.*[!@#\$%\^&\*()_\+\-={}\[\]\\:;"'<>,./]{1,}).{4,}$
should it. explaination:
^ start
(?=.*[a-z]{1,}) @ least 1 upper
(?=.*[a-z]{1,}) @ least 1 lower
(?=.*[0-9]{1,}) @ least 1 digit
(?=.*[!@#\$%\^&\*()_\+\-={}\[\]\\:;"'<>,./]{1,}) @ least 1 of mentioned chars
.{4,} min length 4
$ end
Comments
Post a Comment