1、手机号开头集合
166,
176,177,178
180,181,182,183,184,185,186,187,188,189
145,147
130,131,132,133,134,135,136,137,138,139
150,151,152,153,155,156,157,158,159
198,1992、匹配手机号的规则:[3578]是手机号第二位可能出现的数字
166,
176,177,178
180,181,182,183,184,185,186,187,188,189
145,147
130,131,132,133,134,135,136,137,138,139
150,151,152,153,155,156,157,158,159
198,1992、匹配手机号的规则:[3578]是手机号第二位可能出现的数字
/** * 校验手机号 */ public static boolean isMobile(String mobile){ String regExp="^((13[0-9])|(15[^4])|(166)|(17[0-8])|(18[0-9])|(19[8-9])|(147,145))\\d{8}$"; Pattern pattern =Pattern.compile(regExp); Matcher matcher=pattern.matcher(mobile); return matcher.matches(); }
本文介绍了一种用于验证中国大陆手机号码的正则表达式,并列举了常见的手机号段前缀。通过具体的Java代码示例展示了如何使用该规则进行手机号的有效性检查。

7989

被折叠的 条评论
为什么被折叠?



