查了资料,写的正则,部分直接通过了
/** * 手机号格式验证 非空 & 纯数字 & 11位 * https://www.chahaoba.com/%E7%94%B5%E4%BF%A1%E5%8F%B7%E6%AE%B5 2018最新号段 */ final static public boolean isPhoneNum(String phonenumber) { if (phonenumber == null && ("".equals(phonenumber)) && !isNumeric(phonenumber) && phonenumber.length() != 11) { return false; } Pattern pattern = Pattern.compile("^(0|86|17951)?(13[0-9]|14[01456789]|15[0-9]|16[56]|17[0-8]|18[0-9]|198|199)[0-9]{8}$"); Matcher matcher = pattern.matcher(phonenumber.replaceAll(" ", "")); boolean b = matcher.matches(); return b; }
手机号码前三位列表:
- 13(老)号段:130、131、132、133、134、135、136、137、138、139
- 14(新)号段:1400、1410、1440、145、146、147、148、149
- 15(新)号段:150、151、152、153、154、155、156、157、158、159
- 16(新)号段:165、166
- 17(新)号段:170、171、172、173、175、176、177、178、1740(0-5)、1740(6-9)、1740(10-12)
- 18(3G)号段:180、181、182、183、184、185、186、187、188、189
- 19(新)号段:198、199
13(老)号段
- 130:中国联通,GSM
- 131:中国联通,GSM
- 132:中国联通,GSM
- 133:中国联通,后转给中国电信,CDMA
- 134:中国移动,GSM
- 135:中国移动,GSM
- 136:中国移动,GSM
- 137:中国移动,GSM
- 138:中国移动,GSM
- 139:中国移动,GSM
14号段
- 1400(0-9)号段:中国联通,物联网网号
- 1410(0-9)号段:中国电信,物联网网号
- 1440(0-9)号段:中国移动,物联网网号
- 145:中国联通,上网卡
- 146:中国联通,公众移动通信网号(物联网业务专用号段)
- 147:中国移动,上网卡
- 148:中国移动,公众移动通信网号(物联网业务专用号段)
- 149:中国电信
15(新)号段
- 150:中国移动,GSM
- 151:中国移动,GSM
- 152:中国联通,网友反映实际是中国移动的
- 153:中国联通,后转给中国电信,CDMA
- 154:154号段暂时没有分配
- 155:中国联通,GSM
- 156:中国联通,GSM
- 157:中国移动,GSM
- 158:中国移动,GSM
- 159:中国移动,GSM
16(新)号段
17(4G)号段
- 170:虚拟运营商
- 171:联通
- 172:移动
- 173:电信
- 1740(0-5):中国电信,卫星移动通信业务号
- 1740(6-9):工业和信息化部应急通讯保障中心,卫星移动通信业务号(用于国际应急通讯需求)
- 1740(10-12):工业和信息化部应急通讯保障中心,卫星移动通信业务号(用于国际应急通讯需求)
- 175:联通
- 176:联通
- 177:电信
- 178:移动
18(3G)号段
说明:现在到营业厅办理的新号,基本都是4G服务了。但是也存在号码仍然是3G的用户,运营商也在积极主动的邀请用户将3G升级为4G。本站只将4G刚开放时放号的17号段显示为4G号段,实际上其它各种号段的号码都可能使用4G服务。
- 180:中国电信,3G
- 181:中国电信,3G
- 182:中国移动,3G
- 183:中国移动,3G
- 184:中国移动,3G
- 185:中国联通,3G
- 186:中国联通,3G
- 187:中国移动,3G
- 188:中国移动,3G,TD-CDMA
- 189:中国电信,3G,CDMA,天翼189,2008年底开始对外放号