Andreas Wurst 2025-06-02 15:18:37 +02:00
parent 21eab99bc5
commit b600937a62
1 changed files with 3 additions and 2 deletions

View File

@ -31,8 +31,9 @@ public class Passwort_Check {
// [^/r] schließt Carriage Return aus
// [^/n] schließt Line Feed aus
// [^A-Za-z0-9\\x00-\\x1F\\x7F] [^A-Za-z0-9\t\r\n]
return passwort.matches(".*[^A-Za-z0-9\\x00-\\x1F\\x7F].*[^A-Za-z0-9\\x00-\\x1F\\x7F].*[^A-Za-z0-9\\x00-\\x1F\\x7F].*");
String sonderzeichenRegex = "[^A-Za-z0-9\\x00-\\x1F\\x7F]";
return passwort.matches(".*"+sonderzeichenRegex+".*"+sonderzeichenRegex+".*"+sonderzeichenRegex+".*");
}
public static void main(String[] args) {