判断是否为手机号码

/**
 * 判断是否是手机号
 *
 */
public static boolean isMObie(String mobie){
    Pattern p = Pattern.compile("^(13[0-9]|14[57]|15[0-35-9]|17[0-8]|18[0-9])[0-9]{8}$");
    Matcher m = p.matcher(mobie);

    return m.matches();
}

猜你喜欢

转载自blog.csdn.net/guldanhu/article/details/78687778