List of utility methods to do Password Regex Match
boolean | matchPwd(String pwd) match Pwd String str = "^(?![^a-zA-Z]+$)(?!\\D+$).{6,16}$"; Pattern p = Pattern.compile(str); Matcher m = p.matcher(pwd); return m.matches(); |
boolean | checkpasswd(String passwd) checkpasswd Pattern p = Pattern.compile("^.{6}$"); Matcher matcher = p.matcher(passwd); if (matcher.matches()) { return true; return false; |
boolean | isValidUserNameOrPassword(String string) is Valid User Name Or Password Pattern pattern = Pattern.compile("^([a-zA-Z0-9_]+)$"); Matcher matcher = pattern.matcher(string); if (matcher.find()) { return true; } else { return false; |