Android Utililty Methods Password Regex Match

List of utility methods to do Password Regex Match

Description

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

Method

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)
checkpasswd
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;