手机号码格式验证工具类

public class RegexVerifyUtil {

    /**不严谨的表达式="/^[1]([3-9])[0-9]{9}$/"* */
    public static final String MOBILE="/^[1](([3][0-9])|([4][5-9])|([5][0-3,5-9])|([6][5,6])|([7][0-8])|([8][0-9])|([9][1,8,9]))[0-9]{8}$/";

    public static Boolean verifyMobile(String phone){
        return Pattern.compile(MOBILE).matcher(phone).matches();
    }

你可能感兴趣的:(util工具类)