java最新手机号正则校验

public static boolean CheckMobilePhoneNum(String phoneNum) {
    String regex = "^(1[3-9]\\d{9}$)";
    if (phoneNum.length() == 11) {
    	 Pattern p = Pattern.compile(regex);
         Matcher m = p.matcher(phoneNum);
         if (m.matches()) {
        	 return true;
         }
    }
    return false;
	}
}

  

posted @ 2020-12-22 13:47  浅笑19  阅读(1859)  评论(0)    收藏  举报