简体   繁体   English

正则表达式 - 更改 output 反之亦然

[英]Regex - change output vice versa

I'm creating a regex password check to use it in Java application.我正在创建一个正则表达式密码检查以在 Java 应用程序中使用它。

I wrote a code that finds all suitable passwords.我写了一个找到所有合适密码的代码。 How can it be changed in order to find all non-suitable passwords?如何更改它以找到所有不合适的密码?

Here's code:这是代码:

(?=.*[az])(?=.*\d)(?=.*[AZ]).{10,10}

Since you've found all usable passwords, simply switch the boolean output of this regex.由于您找到了所有可用的密码,只需切换此正则表达式的 boolean output 即可。 I believe Java supports the.相信Java支持。 operator.操作员。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM