//手机号判断 true为通过验证
public static boolean isChinaPhoneLegal(String str) throws PatternSyntaxException {
if (str == null) {
return false;
}
if (str.length() != 11) {
return false;
}
String regExp = "^((13[0-9])|(15[^4])|(18[0,2,3,5-9])|(17[0-8])|(147))\\d{8}$";
Pattern p = Pattern.compile(regExp);
Matcher m = p.matcher(str);
return m.matches();
}
标签:false,手机号,Pattern,正则,str,regExp,return,Android,String From: https://blog.51cto.com/u_13520184/6115616