Android Password Regex Match checkpasswd(String passwd)

Here you can find the source of checkpasswd(String passwd)

Description

checkpasswd

Declaration

public static boolean checkpasswd(String passwd) 

Method Source Code

//package com.java2s;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    public static boolean checkpasswd(String passwd) {

        Pattern p = Pattern.compile("^.{6}$");
        Matcher matcher = p.matcher(passwd);

        if (matcher.matches()) {
            return true;
        }//from w  w w .j  av a  2 s .  c  o  m
        return false;
    }
}

Related

  1. matchPwd(String pwd)
  2. isValidUserNameOrPassword(String string)