Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您将如何构造一个匹配必须由 6 到 16 个字符组成且至少包含一个数字或特殊字符的密码的正则表达式?
您需要为您定义什么构成特殊字符。
像这样的正则表达式应该可以工作:
(?=^.*?[\d#;:'"()`~@!%$&=-])^.{6,16}$