Regex技术:长度最少8位。密码长度最少8位:大写字母,小写字母,数字,特殊符号必须四选三
第一种代码演示
^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\\W_!@#$%^&*.`~()-+=]+$)(?![a-z0-9]+$)(?![a-z\\W_!@#$%^&*.`~()-+=]+$)(?![0-9\\W_!@#$%^&*.`~()-+=]+$)[a-zA-Z0-9\\W_!@#$%^&*.`~()-+=]{8,30}$
第二种代码演示
^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_]+$)(?![a-z0-9]+$)(?![a-z\W_]+$)(?![0-9\W_]+$)[a-zA-Z0-9\W_]{8,}$