Sunday 15 June 2014

javascript - Regex for Password Strength -



javascript - Regex for Password Strength -

this question has reply here:

regex password strength 2 answers

could pleas help me , need look password fulfill next criteria:

at to the lowest degree 8 characters length maximum of 15 characters. at to the lowest degree 1 letter in upper case. at to the lowest degree 1 letter in lower case. at to the lowest degree 1 special character. at to the lowest degree 1 numeral.

these must acceptable in order if possible.

this effort found doesn't fulfill criteria above,i have tried modification problem rests in having these in order , @ to the lowest degree 1 of of characters specified ,i have tried reducing each look below suit :

^(?=.*[a-z].*[a-z])(?=.*[!@#$&*])(?=.*[0-9].*[0-9])(?=.*[a-z].*[a-z].*[a-z]).{8}$ ^ start anchor (?=.*[a-z].*[a-z]) ensure string has 2 uppercase letters. (?=.*[!@#$&*]) ensure string has 1 special case letter. (?=.*[0-9].*[0-9]) ensure string has 2 digits. (?=.*[a-z].*[a-z].*[a-z]) ensure string has 3 lowercase letters. .{8} ensure string of length 8. $ end anchor.

there no duplicate ,please review marking unless sure duplicate

try regex helps

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

javascript jquery regex password-protection

No comments:

Post a Comment