Js之正则表达式请使用字母、数字和特殊符号组合,8-20个字符

参考:

Js之正则表达式请使用字母、数字和特殊符号组合,8-20个字符

https://*.com/questions/19605150/regex-for-password-must-contain-at-least-eight-characters-at-least-one-number-a

实际:

  • At least 8 characters long;
  • At most 20 characters long;
  • One lowercase / one uppercase, one number and one special character;
  • No whitespaces.
'^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[@$!%*?&^#~])([a-zA-Z0-9@$!%*?&^#~]{8,20})$'

 

上一篇:475. 供暖器


下一篇:SQL文中取两个字段的最小值