上述标准的正则表达式是什么?
我正在创建用于更强密码的检查:)
我正在使用的C#
最佳答案
这应该做到这一点:
(?=.*?[a-z])(?=.*?[A-Z])(?=.*?[^a-zA-Z]).{8,}
看到这里:rubular
解释:
(?=.*?[a-z]) //lookahead, there has to be a lower case alphabetic char
(?=.*?[A-Z]) //lookahead, there has to be a upper case alphabetic char
(?=.*?[^a-zA-Z]) //lookahead, there has to be a non-alphabetic char
.{8,} // any character at least 8 times
关于正则表达式至少8 +上下数字或其他非字母,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6029193/