{"id":13461646,"url":"https://github.com/VincentSit/ChinaMobilePhoneNumberRegex","last_synced_at":"2025-03-24T22:34:47.276Z","repository":{"id":24782501,"uuid":"28196087","full_name":"VincentSit/ChinaMobilePhoneNumberRegex","owner":"VincentSit","description":"Regular expressions that match the mobile phone number in mainland China. / 一组匹配中国大陆手机号码的正则表达式。","archived":false,"fork":false,"pushed_at":"2022-05-17T03:02:26.000Z","size":79,"stargazers_count":4790,"open_issues_count":4,"forks_count":507,"subscribers_count":165,"default_branch":"master","last_synced_at":"2025-03-23T12:42:05.213Z","etag":null,"topics":["china-mobile","china-telecom","china-unicom","mainland-china","phone-number","regex","regular-expression"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VincentSit.png","metadata":{"files":{"readme":"README-CN.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-18T18:30:22.000Z","updated_at":"2025-03-19T10:05:17.000Z","dependencies_parsed_at":"2022-07-14T06:50:29.306Z","dependency_job_id":null,"html_url":"https://github.com/VincentSit/ChinaMobilePhoneNumberRegex","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentSit%2FChinaMobilePhoneNumberRegex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentSit%2FChinaMobilePhoneNumberRegex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentSit%2FChinaMobilePhoneNumberRegex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VincentSit%2FChinaMobilePhoneNumberRegex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VincentSit","download_url":"https://codeload.github.com/VincentSit/ChinaMobilePhoneNumberRegex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366203,"owners_count":20603438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["china-mobile","china-telecom","china-unicom","mainland-china","phone-number","regex","regular-expression"],"created_at":"2024-07-31T11:00:50.349Z","updated_at":"2025-03-24T22:34:47.247Z","avatar_url":"https://github.com/VincentSit.png","language":null,"funding_links":[],"categories":["Others","miscellaneous","有趣项目"],"sub_categories":[],"readme":"# ChinaMobilePhoneNumberRegex\n\n**ChinaMobilePhoneNumberRegex 仍在积极维护中，我们致力于修复错误并合并来自更广泛社区的高质量的PR。**\n\n一组匹配中国大陆手机号码的正则表达式。\n\n## 限制\n\n中国大陆已于中国标准时间 2019 年 12 月 1 日正式开启携号转网服务，通过手机号码检测移动通信运营商已经不再精准。然而目前还没有其他替代方案。\n\n## 正则表达式 ([PCRE])\n\n###### 如果你需要 POSIX 标准的正则表达式，[点击这里](/POSIX-CN.md)\n\n### 匹配所有号码（手机卡 + 数据卡 + 上网卡）\n[`^(?:\\+?86)?1(?:3\\d{3}|5[^4\\D]\\d{2}|8\\d{3}|7(?:[0-35-9]\\d{2}|4(?:0\\d|1[0-2]|9\\d))|9[0-35-9]\\d{2}|6[2567]\\d{2}|4(?:(?:10|4[01])\\d{3}|[68]\\d{4}|[579]\\d{2}))\\d{6}$`][匹配所有号码（手机卡 + 数据卡 + 上网卡）]\n\n### 匹配所有支持短信功能的号码（手机卡 + 上网卡）\n[`^(?:\\+?86)?1(?:3\\d{3}|5[^4\\D]\\d{2}|8\\d{3}|7(?:[0-35-9]\\d{2}|4(?:0\\d|1[0-2]|9\\d))|9[0-35-9]\\d{2}|6[2567]\\d{2}|4[579]\\d{2})\\d{6}$`][匹配所有支持短信功能的号码（手机卡 + 上网卡）]\n\n### 手机卡\n\n#### 匹配所有\n[`^(?:\\+?86)?1(?:3\\d{3}|5[^4\\D]\\d{2}|8\\d{3}|7(?:[235-8]\\d{2}|4(?:0\\d|1[0-2]|9\\d))|9[0-35-9]\\d{2}|66\\d{2})\\d{6}$`][匹配基础运营商]\n\n#### 匹配中国移动\n[`^(?:\\+?86)?1(?:3(?:4[^9\\D]|[5-9]\\d)|5[^3-6\\D]\\d|7[28]\\d|8[23478]\\d|9[578]\\d)\\d{7}$`][匹配基础运营商中国移动]\n\n#### 匹配中国联通\n[`^(?:\\+?86)?1(?:3[0-2]|[578][56]|66|96)\\d{8}$`][匹配基础运营商中国联通]\n\n#### 匹配中国电信\n[`^(?:\\+?86)?1(?:3(?:3\\d|49)\\d|53\\d{2}|8[019]\\d{2}|7(?:[37]\\d{2}|40[0-5])|9[0139]\\d{2})\\d{6}$`][匹配基础运营商中国电信]\n\n#### 匹配中国广电\n[`^(?:\\+?86)?192\\d{8}$`][匹配基础运营商中国广电]\n\n#### 匹配北京船舶通信导航有限公司（海事卫星通信）\n[`^(?:\\+?86)?1749\\d{7}$`][匹配北京船舶通信导航有限公司（海事卫星通信）]\n\n#### 工业和信息化部应急通信保障中心（应急通信）\n[`^(?:\\+?86)?174(?:0[6-9]|1[0-2])\\d{6}$`][工业和信息化部应急通信保障中心（应急通信）]\n\n### 虚拟运营商\n\n#### 匹配所有\n[`^(?:\\+?86)?1(?:7[01]|6[257])\\d{8}$`][匹配虚拟运营商]\n\n#### 匹配中国移动\n[`^(?:\\+?86)?1(?:65\\d|70[356])\\d{7}$`][匹配虚拟运营商中国移动]\n\n#### 匹配中国联通\n[`^(?:\\+?86)?1(?:70[4789]|71\\d|67\\d)\\d{7}$`][匹配虚拟运营商中国联通]\n\n#### 匹配中国电信\n[`^(?:\\+?86)?1(?:70[012]|62\\d)\\d{7}$`][匹配虚拟运营商中国电信]\n\n### 物联网数据卡\n\n#### 匹配所有\n[`^(?:\\+?86)?14(?:[14]0|41|[68]\\d)\\d{9}$`][匹配所有物联网数据卡]\n\n#### 匹配中国移动\n[`^(?:\\+?86)?14(?:4[01]|8\\d)\\d{9}$`][匹配物联网中国移动]\n\n#### 匹配中国联通\n[`^(?:\\+?86)?146\\d{10}$`][匹配物联网中国联通]\n\n#### 匹配中国电信\n[`^(?:\\+?86)?1410\\d{9}$`][匹配物联网中国电信]\n\n### 上网卡\n\n#### 匹配所有\n[`^(?:\\+?86)?14[579]\\d{8}$`][匹配所有上网卡]\n\n#### 匹配中国移动\n[`^(?:\\+?86)?147\\d{8}$`][匹配上网卡中国移动]\n\n#### 匹配中国联通\n[`^(?:\\+?86)?145\\d{8}$`][匹配上网卡中国联通]\n\n#### 匹配中国电信\n[`^(?:\\+?86)?149\\d{8}$`][匹配上网卡中国电信]\n\n## 在线测试/调试\n\nhttps://regex101.com   \nhttps://regexr.com   \nhttps://www.debuggex.com （PCRE 在线视觉化）\n\n## 规则\n\n#### 手机卡 - 基础运营商\n\n- 支持语音通话 / 短信 / 数据流量\n- 号码长度 11 位\n \n| 运营商 \u003csup\u003e[1]\u003csup/\u003e | 号段 |\n| --- | --- |\n| 中国移动 | 134-0~8 / 135 / 136 / 137 / 138 / 139 / 150 / 151 / 152 / 157 / 158 / 159 / 172 / 178 / 182 / 183 / 184 / 187 / 188 / 195 / 197 / 198 |\n| 中国联通 | 130 / 131 / 132 / 155 / 156 / 166 / 175 / 176 / 185 / 186 / 196 |\n| 中国电信 | 133 / 134-9 / 153 / 173 / 174-00~05 / 177 / 180 / 181 / 189 / 190 / 191 / 193 / 199 |\n| 中国广电 | 192 |\n| 北京船舶通信导航有限公司（海事卫星通信） | 174-9 |\n| 工业和信息化部应急通信保障中心（应急通信） | 174-06~12 |\n\n\n#### 手机卡 - 虚拟运营商\n\n- 支持语音通话 / 短信 / 数据流量\n- 号码长度 11 位\n\n| 运营商 \u003csup\u003e[1]\u003csup/\u003e | 号段 |\n| --- | --- |\n| 中国移动 | 165 / 1703 / 1705 / 1706 |\n| 中国联通 | 167 / 1704 / 1707 / 1708 / 1709 / 171 |\n| 中国电信 | 162 / 1700 / 1701 / 1702 |\n\n#### 物联网数据卡\n\n- 支持数据流量\n- 号码长度 13 位\n\n| 运营商 \u003csup\u003e[1]\u003csup/\u003e | 号段 |\n| --- | --- |\n| 中国移动 | 1440X / 1441X / 148XX |\n| 中国联通 | 146XX |\n| 中国电信 | 1410X |\n\n#### 上网卡\n\n- 支持语音通话（部分） / 短信 / 数据流量\n- 号码长度 11 位\n\n| 运营商\u003csup\u003e[1]\u003csup/\u003e | 号段 | 语音通话 \u003csup\u003e[2]\u003csup/\u003e |\n| --- | --- | --- |\n| 中国移动 | 147 | 支持 |\n| 中国联通 | 145 | 不支持 |\n| 中国电信 | 149 | 支持 |\n\n1. 注意：由于[携号转网]的在部分地区已经试行，对于成功进行携号转网的用户，手机号段不再能体现其当前所属运营商。\n2. 根据工信部相关文件，145 / 147 / 149 号段允许提供语音通话功能，运营商可以根据用户需要自主决定是否提供语音通话功能。目前 147 / 149 号段已经有支持语音通话的号码卡放出。\n\n## 参考\n\n[中国内地移动终端通讯号码 - 维基百科]\n\n## 关注更新\n\n由于手机号码正则表达式具有时效性，所以当任何正则表达式出现变更时，都会发布一个新版本来触发 GitHub 的邮件系统通知所有观察了本项目的用户。如果您希望在任何正则表达式出现变更时及时得到通知，请观察本项目。\n\n[如何观察项目新版本？]\n\n## 更新日志\n\n#### 2020.05.03\n- 添加 1441 号段支持。\n\n#### 2020.04.16\n- 添加 192 号段支持。\n\n#### 2020.04.07\n- 添加 172 号段支持。\n\n#### 2019.12.26\n- 添加 190 / 196 / 197 号段支持。\n\n#### 2019.12.24\n- 添加 162 / 193 / 195 号段支持。\n\n#### 2019.12.01\n- 添加对于携号转网服务的提醒。\n\n#### 2019.01.10\n- 优化部分正则表达式在 JavaScript 中的兼容性。\n\n#### 2019.01.07\n- 添加 165 号段支持。\n\n#### 2018.12.30\n- 加入可选的国家码匹配。\n- 加入正则表达式可视化链接。\n- 修复 17X 号段在匹配非 174X 时无法匹配（例如 178）。\n- 修复排除型字符集合和排除型的字符范围中未排除非数字。 \n- 优化部分正则表达式。\n\n#### 2018.12.29\n- 添加 146 / 149 / 167 / 191 / 1440X / 148XX / 1410X / 174\\-00\\~05 / 174\\-06\\~12 / 174\\-9 号段支持。\n\n#### 2017.08.09\n- 添加 166 / 198 / 199 号段支持。\n\n#### 2016.10.15\n- 添加英文文档。\n- 添加 175 号段支持。\n- 移除测试工程。\n- 修复 1349 号段匹配问题。\n\n#### 2016.04.05\n- 添加 171 号段支持。\n- 分离 14\\* 号段匹配。\n- 完善虚拟运营商号段匹配。\n\n#### 2014.12.19\n- 初次发布。\n\n## 协议\n\nMIT\n\n[PCRE]: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions\n\n[匹配所有号码（手机卡 + 数据卡 + 上网卡）]: https://www.debuggex.com/r/dwRbKIxaFfBEIkxh\n\n[匹配所有支持短信功能的号码（手机卡 + 上网卡）]: https://www.debuggex.com/r/IivlZsRjoXSX_FJ3\n\n[匹配基础运营商]: https://www.debuggex.com/r/J1CfULu4yR_8AF9w\n\n[匹配基础运营商中国移动]: https://www.debuggex.com/r/yVWOF0Gglm9xCCqF\n\n[匹配基础运营商中国联通]: https://www.debuggex.com/r/ntO95QNIS8SEsHet\n\n[匹配基础运营商中国电信]: https://www.debuggex.com/r/liI6MhT97bNIQTp-\n\n[匹配基础运营商中国广电]: https://www.debuggex.com/r/cFcG0x8htmWNm-xF\n\n[匹配北京船舶通信导航有限公司（海事卫星通信）]: https://www.debuggex.com/r/Ewdta8YJfreoXguf\n\n[工业和信息化部应急通信保障中心（应急通信）]: https://www.debuggex.com/r/ueZ3m3NQr400LWmF\n\n[匹配虚拟运营商]: https://www.debuggex.com/r/Gu0hy7G2qrGY3YlU\n\n[匹配虚拟运营商中国移动]: https://www.debuggex.com/r/eXKVlO3E5W9wn5RJ\n\n[匹配虚拟运营商中国联通]: https://www.debuggex.com/r/bKyapelcUxT0KZXb\n\n[匹配虚拟运营商中国电信]: https://www.debuggex.com/r/j22iLshKfI_avga-\n\n[匹配所有物联网数据卡]: https://www.debuggex.com/r/paDEMqjp1F5dM40F\n\n[匹配物联网中国移动]: https://www.debuggex.com/r/lVn_7eMXVOEiXXK_\n\n[匹配物联网中国联通]: https://www.debuggex.com/r/esYULNSOSyXxoACe\n\n[匹配物联网中国电信]: https://www.debuggex.com/r/9g8nJMl_hWpaGLTi\n\n[匹配所有上网卡]: https://www.debuggex.com/r/IHFTe5Z099QxCyvb\n\n[匹配上网卡中国移动]: https://www.debuggex.com/r/zu-yH27vlHT3oSJ7\n\n[匹配上网卡中国联通]: https://www.debuggex.com/r/4YLUXlvZD6VcvPtQ\n\n[匹配上网卡中国电信]: https://www.debuggex.com/r/uzvr1c395PsqG-K6\n\n[携号转网]: https://zh.wikipedia.org/zh-cn/%E9%9B%BB%E8%A9%B1%E8%99%9F%E7%A2%BC%E5%8F%AF%E6%94%9C%E6%9C%8D%E5%8B%99\n\n[中国内地移动终端通讯号码 - 维基百科]: https://zh.wikipedia.org/wiki/%E4%B8%AD%E5%9B%BD%E5%86%85%E5%9C%B0%E7%A7%BB%E5%8A%A8%E7%BB%88%E7%AB%AF%E9%80%9A%E8%AE%AF%E5%8F%B7%E7%A0%81\n\n[如何观察项目新版本？]: https://help.github.com/articles/watching-and-unwatching-releases-for-a-repository/#watching-releases-for-a-repository\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVincentSit%2FChinaMobilePhoneNumberRegex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVincentSit%2FChinaMobilePhoneNumberRegex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVincentSit%2FChinaMobilePhoneNumberRegex/lists"}