RegEx For Strong Password

后端 未结 4 1129
情书的邮戳
情书的邮戳 2020-12-18 00:35

I have the following password requirements:

1) Should be 6-15 characters in length
2) Should have atleast one lowercase character
3) Should have atleast one

4条回答
  •  醉酒成梦
    2020-12-18 01:04

    I'm not entirely sure what you mean by "special character" so I am interpreting this to mean \W, but you can change this if you want:

    ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\W)\S{6,15}$
    

提交回复
热议问题