美文网首页
手机号码检索

手机号码检索

作者: 122604 | 来源:发表于2018-02-25 20:10 被阅读0次
/**
 * 判断是否为手机号
 *
 * @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}$)");
    }
}

相关文章

网友评论

      本文标题:手机号码检索

      本文链接:https://www.haomeiwen.com/subject/xztdxftx.html