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

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -