public static void main(String[] args) {
isPassword("1234561zZ12");
}
private static boolean isPassword(String password) {
String regex = "^[0-9A-Za-z]{6,16}$";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(password);
boolean isMatch = m.matches();
System.out.println(isMatch);
return isMatch;
}
安卓密码校验
最新推荐文章于 2024-04-30 12:00:30 发布