至少八个字符,至少一个字母和一个数字:
"^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$"
至少八个字符,至少一个字母,一个数字和一个特殊字符:
"^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$"
最少八个字符,至少一个大写字母,一个小写字母和一个数字:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$"
至少八个字符,至少一个大写字母,一个小写字母,一个数字和一个特殊字符:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}"
最少八个最多十个字符,至少一个大写字母,一个小写字母,一个数字和一个特殊字符:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,10}"
至少八个字符,至少一个大写字母,一个小写字母,一个特殊字符,数字随意可有可无:
^(?=.*[a-z])(?=.*[A-Z])(?=.*[$@$!%_*?&-])[A-Za-z\d$@$!%_*?&-]{8,}