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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -