Regex to check password validation -


this question has answer here:

i have refered, srinivas's answer make password validation. regex minimum 8 character, 1 number, 1 alphabet , 1 special character

"^(?=.*[a-za-z])(?=.*\d)(?=.*[$@$!%*#?&])[a-za-z\d$@$!%*#?&]{8,}$" 

with regex, can use following special characters. $@$!%*#?& . if use dheepan~123 or dheepan.123 vaildation fails. how can allow special characters?

you can allow special char using \w i'm not sure want this... anyway:

^(?=.*[a-za-z])(?=.*\d)(?=.*[\w])[\w\w]{8,}$ 

Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

android - Create single AAR file from multiple modules using Gradle -