验证手机号

来源:互联网 发布:mac电源已接通 灯不亮 编辑:程序博客网 时间:2024/03/28 16:23
public static boolean IsTelphone(String telphone) {
boolean flag = false;
if (telphone.length() >= 11) {         
Pattern pt = Pattern.compile("^((13[0-9])|(14[0-9])|(15[^4,\\D])|(18[^4,\\D]))\\d{8}$");
Matcher mct = pt.matcher(telphone);
if(mct.find())flag=true;
}
return flag;
}