public static boolean matchnumber(String number){
String regex ="^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(16[6,7])|(17[0-8])|(18[0-9])|(19[1|8|9]))\\d{8}$";
return Pattern.compile(regex).matcher(number).matches();
}
public static boolean matchnumber(String number){
String regex ="^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(16[6,7])|(17[0-8])|(18[0-9])|(19[1|8|9]))\\d{8}$";
return Pattern.compile(regex).matcher(number).matches();
}
本文标题:最新的手机号是否合法的判断
本文链接:https://www.haomeiwen.com/subject/mpsdyqtx.html
网友评论