Android 正则判断手机号(包含网络运营商)


对本知识点有任何问题,可加我的个人微信:kymjs123
public static boolean isMatchered(CharSequence num) {
    Pattern pattern = Pattern.compile("^(1[0-9][0-9])\\d{8}$");
    Matcher matcher = pattern.matcher(num);
    return matcher.find();
}