This commit is contained in:
lijiaqi 2023-07-24 13:36:37 +08:00
parent 0cefd9e67f
commit 97264a3f4f
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ import java.util.regex.Pattern;
public class PasswordUtil {
public static Boolean valid(String password) {
String regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[!@#$%^&*])[a-zA-Z\\d!@#$%^&*]{8,}$\n";
String regexp = "^(?=.[a-z])(?=.[A-Z])(?=.\\d)(?=.[!@#$%^&*]).{8,}$";
return Pattern.matches(regexp, password);
}