regex - Password Regular Expression -
i need generate password regex next criteria:
a valid password must contain @ to the lowest degree 8 characters. must have @ to the lowest degree 1 uppercase, 1 lowercase , 1 non alphabetic character.
so far, created pattern:
((?=.*\\d)(?=.*[a-z])(?=.*[a-z]).{8,50}) but still taking string has no non alphabetic character. how can this? thanks
you can seek this
|->match 8 or more chars ----- ^(?=.*?[a-z])(?=.*?[a-z])(?=.*?[^a-za-z]).{8,}$ ------------ ---------- --------------- | | |->matches farther if there atleast 1 non alphabetic char | |->matches farther if there atleast 1 a-z |->matches farther if there atleast 1 a-z regex passwords
No comments:
Post a Comment