手机号码检索

2018-02-25  本文已影响0人  122604
/**
 * 判断是否为手机号
 *
 * @param phoneStr
 * @return
 */
public static boolean isPhone(String phoneStr) {
    if (TextUtils.isEmpty(phoneStr)) {
        return false;
    } else {
        String replace = phoneStr.replace(" ", "");
        return replace.matches("^((1[3-9])\\d{9}$)");
    }
}
上一篇 下一篇

猜你喜欢

热点阅读