Android Utililty Methods Password Regex Match

List of utility methods to do Password Regex Match


The list of methods to do Password Regex Match are organized into topic(s).


booleanmatchPwd(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();
booleancheckpasswd(String passwd)
Pattern p = Pattern.compile("^.{6}$");
Matcher matcher = p.matcher(passwd);
if (matcher.matches()) {
    return true;
return false;
booleanisValidUserNameOrPassword(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;