检测手机号码有效性(2014)

来源:互联网 发布:ssh使用的端口号是 编辑:程序博客网 时间:2024/05/17 13:09

// 检测手机号码号段,参考http://www.qq0574.com/tongxin/9655.html中所罗列号段,如果有新的号段,以后再添加        Pattern p2 = Pattern.compile("^((13\\d{1}|14[57]|15[012356789]|17[0678]|18\\d{1})\\d{8})$");        Matcher matcher2 = p2.matcher(phone);        if (matcher2.matches()) {            return true;        }

0 0
原创粉丝点击