Regex for password must contain at least eight characters, at least one number and both lower and uppercase letters and special characters

前端 未结 30 4444
伪装坚强ぢ
伪装坚强ぢ 2020-11-21 04:28

I want a regular expression to check that:

A password contains at least eight characters, including at least one number and includes both lower and uppercase letter

30条回答
  •  暖寄归人
    2020-11-21 05:11

    Pattern to match at least 1 upper case character, 1 digit and any special characters and the length between 8 to 63.

    "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d\\W]{8,63}$"
    

    This pattern was used for JAVA programming.

提交回复
热议问题