( # Start of group
(?=.*\d) # must contains one digit from 0-9
(?=.*[a-z]) # must contains one lowercase characters
(?=.*[A-Z]) # must contains one uppercase characters
(?=.*[@#$%]) # must contains one special symbols in the list "@#$%"
. # match anything with previous condition checking
{6,20} # length at least 6 characters and maximum of 20
) # End of group
2 回答
如果不理解这个问题,我很确定你正在寻找大多数正则表达方言中的正面或负面的观察 .
例如:
来源:https://www.mkyong.com/regular-expressions/how-to-validate-password-with-regular-expression/
你可以做这样的事情来找到
number
使用的special characters
.https://jsfiddle.net/zpz16504/