From 8be2b39c22319ad83aa93b423935c849e09e5581 Mon Sep 17 00:00:00 2001 From: VincentXue Date: Thu, 16 Apr 2020 23:34:34 +0800 Subject: [PATCH] - Add support for 192 prefix. - Fix some regular expressions not covering the prefix 190 / 192 / 195 / 196 / 197. --- POSIX-CN.md | 60 +++++++++++++++++++++++++++++++--------------------- POSIX.md | 60 +++++++++++++++++++++++++++++++--------------------- README-CN.md | 33 ++++++++++++++++++----------- README.md | 33 ++++++++++++++++++----------- 4 files changed, 114 insertions(+), 72 deletions(-) diff --git a/POSIX-CN.md b/POSIX-CN.md index 02bcba1..0c688b5 100644 --- a/POSIX-CN.md +++ b/POSIX-CN.md @@ -28,76 +28,88 @@ --> | 命令 | 正则表达式 | | --- | --- | -| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([0-35-9][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0135-9][0-9]{2}\|6[2567][0-9]{2}\|4([14]0[0-9]{3}\|[68][0-9]{4}\|[579][0-9]{2}))[0-9]{6}$` | -| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([0-35-9][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0135-9][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4\([14]0[0-9]\{3\}\\|[68][0-9]\{4\}\\|[579][0-9]\{2\}\)\)[0-9]\{6\}$` | +| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([0-35-9][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0-35-9][0-9]{2}\|6[2567][0-9]{2}\|4([14]0[0-9]{3}\|[68][0-9]{4}\|[579][0-9]{2}))[0-9]{6}$` | +| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([0-35-9][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0-35-9][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4\([14]0[0-9]\{3\}\\|[68][0-9]\{4\}\\|[579][0-9]\{2\}\)\)[0-9]\{6\}$` | ### 匹配所有支持短信功能的号码(手机卡 + 上网卡) | 命令 | 正则表达式 | | --- | --- | -| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([0-35-9][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0135-9][0-9]{2}\|6[2567][0-9]{2}\|4[579][0-9]{2})[0-9]{6}$` | -| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([0-35-9][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0135-9][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4[579][0-9]\{2\}\)[0-9]\{6\}$` | +| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([0-35-9][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0-35-9][0-9]{2}\|6[2567][0-9]{2}\|4[579][0-9]{2})[0-9]{6}$` | +| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([0-35-9][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0-35-9][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4[579][0-9]\{2\}\)[0-9]\{6\}$` | ### 手机卡 #### 匹配所有 | 命令 | 正则表达式 | | --- | --- | -| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([235-8][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0135-9][0-9]{2}\|66[0-9]{2})[0-9]{6}$` | -| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([235-8][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0135-9][0-9]\{2\}\\|66[0-9]\{2\}\)[0-9]\{6\}$` | +| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([235-8][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0-35-9][0-9]{2}\|66[0-9]{2})[0-9]{6}$` | +| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([235-8][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0-35-9][0-9]\{2\}\\|66[0-9]\{2\}\)[0-9]\{6\}$` | #### 匹配中国移动 | 命令 | 正则表达式 | | --- | --- | -| GNU ERE | `^(+?86)?1(3(4[0-8]\|[5-9][0-9])\|5[012789][0-9]\|7[28][0-9]\|8[23478][0-9]\|98[0-9])[0-9]{7}$` | -| GNU BRE | `^\(+\?86\)\?1\(3\(4[0-8]\\|[5-9][0-9]\)\\|5[012789][0-9]\\|7[28][0-9]\\|8[23478][0-9]\\|98[0-9]\)[0-9]\{7\}$` | +| GNU ERE | `^(+?86)?1(3(4[0-8]\|[5-9][0-9])\|5[012789][0-9]\|7[28][0-9]\|8[23478][0-9]\|9[578][0-9])[0-9]{7}$` | +| GNU BRE | `^\(+\?86\)\?1\(3\(4[0-8]\\|[5-9][0-9]\)\\|5[012789][0-9]\\|7[28][0-9]\\|8[23478][0-9]\\|9[578][0-9]\)[0-9]\{7\}$` | #### 匹配中国联通 | 命令 | 正则表达式 | | --- | --- | -| GNU ERE | `^(+?86)?1(3[0-2]\|[578][56]\|66)[0-9]{8}$` | -| GNU BRE | `^\(+\?86\)\?1\(3[0-2]\\|[578][56]\\|66\)[0-9]\{8\}$` | +| GNU ERE | `^(+?86)?1(3[0-2]\|[578][56]\|66|96)[0-9]{8}$` | +| GNU BRE | `^\(+\?86\)\?1\(3[0-2]\\|[578][56]\\|66|96\)[0-9]\{8\}$` | #### 匹配中国电信 | 命令 | 正则表达式 | | --- | --- | -| GNU ERE | `^(+?86)?1(3(3[0-9]\|49)[0-9]\|53[0-9]{2}\|8[019][0-9]{2}\|7([37][0-9]{2}\|40[0-5])\|9[139][0-9]{2})[0-9]{6}$` | -| GNU BRE | `^\(+\?86\)\?1\(3\(3[0-9]\\|49\)[0-9]\\|53[0-9]\{2\}\\|8[019][0-9]\{2\}\\|7\([37][0-9]\{2\}\\|40[0-5]\)\\|9[139][0-9]\{2\}\)[0-9]\{6\}$` | +| GNU ERE | `^(+?86)?1(3(3[0-9]\|49)[0-9]\|53[0-9]{2}\|8[019][0-9]{2}\|7([37][0-9]{2}\|40[0-5])\|9[0139][0-9]{2})[0-9]{6}$` | +| GNU BRE | `^\(+\?86\)\?1\(3\(3[0-9]\\|49\)[0-9]\\|53[0-9]\{2\}\\|8[019][0-9]\{2\}\\|7\([37][0-9]\{2\}\\|40[0-5]\)\\|9[0139][0-9]\{2\}\)[0-9]\{6\}$` | + +#### 匹配中国广电 + + + +| 命令 | 正则表达式 | +| --- | --- | +| GNU ERE | `^(+?86)?192[0-9]{8}$` | +| GNU BRE | `^\(+\?86\)\?192[0-9]\{8\}$` | #### 匹配北京船舶通信导航有限公司(海事卫星通信) diff --git a/POSIX.md b/POSIX.md index f2c41d5..78d1e9f 100644 --- a/POSIX.md +++ b/POSIX.md @@ -31,76 +31,88 @@ See https://help.github.com/articles/organizing-information-with-tables/#formatt --> | Command | Regular Expression | | --- | --- | -| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([0-35-9][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0135-9][0-9]{2}\|6[2567][0-9]{2}\|4([14]0[0-9]{3}\|[68][0-9]{4}\|[579][0-9]{2}))[0-9]{6}$` | -| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([0-35-9][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0135-9][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4\([14]0[0-9]\{3\}\\|[68][0-9]\{4\}\\|[579][0-9]\{2\}\)\)[0-9]\{6\}$` | +| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([0-35-9][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0-35-9][0-9]{2}\|6[2567][0-9]{2}\|4([14]0[0-9]{3}\|[68][0-9]{4}\|[579][0-9]{2}))[0-9]{6}$` | +| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([0-35-9][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0-35-9][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4\([14]0[0-9]\{3\}\\|[68][0-9]\{4\}\\|[579][0-9]\{2\}\)\)[0-9]\{6\}$` | ### Match all numbers with SMS (Phone number + Data only number) | Command | Regular Expression | | --- | --- | -| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([0-35-9][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0135-9][0-9]{2}\|6[2567][0-9]{2}\|4[579][0-9]{2})[0-9]{6}$` | -| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([0-35-9][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0135-9][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4[579][0-9]\{2\}\)[0-9]\{6\}$` | +| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([0-35-9][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0-35-9][0-9]{2}\|6[2567][0-9]{2}\|4[579][0-9]{2})[0-9]{6}$` | +| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([0-35-9][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0-35-9][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4[579][0-9]\{2\}\)[0-9]\{6\}$` | ### Mobile phone number #### Match all | Command | Regular Expression | | --- | --- | -| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([235-8][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0135-9][0-9]{2}\|66[0-9]{2})[0-9]{6}$` | -| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([235-8][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0135-9][0-9]\{2\}\\|66[0-9]\{2\}\)[0-9]\{6\}$` | +| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[01235-9][0-9]{2}\|8[0-9]{3}\|7([235-8][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[0-35-9][0-9]{2}\|66[0-9]{2})[0-9]{6}$` | +| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[01235-9][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([235-8][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[0-35-9][0-9]\{2\}\\|66[0-9]\{2\}\)[0-9]\{6\}$` | #### Match China Mobile | Command | Regular Expression | | --- | --- | -| GNU ERE | `^(+?86)?1(3(4[0-8]\|[5-9][0-9])\|5[012789][0-9]\|7[28][0-9]\|8[23478][0-9]\|98[0-9])[0-9]{7}$` | -| GNU BRE | `^\(+\?86\)\?1\(3\(4[0-8]\\|[5-9][0-9]\)\\|5[012789][0-9]\\|7[28][0-9]\\|8[23478][0-9]\\|98[0-9]\)[0-9]\{7\}$` | +| GNU ERE | `^(+?86)?1(3(4[0-8]\|[5-9][0-9])\|5[012789][0-9]\|7[28][0-9]\|8[23478][0-9]\|9[578][0-9])[0-9]{7}$` | +| GNU BRE | `^\(+\?86\)\?1\(3\(4[0-8]\\|[5-9][0-9]\)\\|5[012789][0-9]\\|7[28][0-9]\\|8[23478][0-9]\\|9[578][0-9]\)[0-9]\{7\}$` | #### Match China Unicom | Command | Regular Expression | | --- | --- | -| GNU ERE | `^(+?86)?1(3[0-2]\|[578][56]\|66)[0-9]{8}$` | -| GNU BRE | `^\(+\?86\)\?1\(3[0-2]\\|[578][56]\\|66\)[0-9]\{8\}$` | +| GNU ERE | `^(+?86)?1(3[0-2]\|[578][56]\|66|96)[0-9]{8}$` | +| GNU BRE | `^\(+\?86\)\?1\(3[0-2]\\|[578][56]\\|66|96\)[0-9]\{8\}$` | #### Match China Telecom | Command | Regular Expression | | --- | --- | -| GNU ERE | `^(+?86)?1(3(3[0-9]\|49)[0-9]\|53[0-9]{2}\|8[019][0-9]{2}\|7([37][0-9]{2}\|40[0-5])\|9[139][0-9]{2})[0-9]{6}$` | -| GNU BRE | `^\(+\?86\)\?1\(3\(3[0-9]\\|49\)[0-9]\\|53[0-9]\{2\}\\|8[019][0-9]\{2\}\\|7\([37][0-9]\{2\}\\|40[0-5]\)\\|9[139][0-9]\{2\}\)[0-9]\{6\}$` | +| GNU ERE | `^(+?86)?1(3(3[0-9]\|49)[0-9]\|53[0-9]{2}\|8[019][0-9]{2}\|7([37][0-9]{2}\|40[0-5])\|9[0139][0-9]{2})[0-9]{6}$` | +| GNU BRE | `^\(+\?86\)\?1\(3\(3[0-9]\\|49\)[0-9]\\|53[0-9]\{2\}\\|8[019][0-9]\{2\}\\|7\([37][0-9]\{2\}\\|40[0-5]\)\\|9[0139][0-9]\{2\}\)[0-9]\{6\}$` | + +#### Match China Broadcast Network + + + +| 命令 | 正则表达式 | +| --- | --- | +| GNU ERE | `^(+?86)?192[0-9]{8}$` | +| GNU BRE | `^\(+\?86\)\?192[0-9]\{8\}$` | #### Match Inmarsat (Satellite Communications) diff --git a/README-CN.md b/README-CN.md index 229590b..c757700 100644 --- a/README-CN.md +++ b/README-CN.md @@ -11,24 +11,27 @@ ###### 如果你需要 POSIX 标准的正则表达式,[点击这里](/POSIX-CN.md) ### 匹配所有号码(手机卡 + 数据卡 + 上网卡) -[`^(?:\+?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[0135-9]\d{2}|6[2567]\d{2}|4(?:[14]0\d{3}|[68]\d{4}|[579]\d{2}))\d{6}$`][匹配所有号码(手机卡 + 数据卡 + 上网卡)] +[`^(?:\+?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(?:[14]0\d{3}|[68]\d{4}|[579]\d{2}))\d{6}$`][匹配所有号码(手机卡 + 数据卡 + 上网卡)] ### 匹配所有支持短信功能的号码(手机卡 + 上网卡) -[`^(?:\+?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[0135-9]\d{2}|6[2567]\d{2}|4[579]\d{2})\d{6}$`][匹配所有支持短信功能的号码(手机卡 + 上网卡)] +[`^(?:\+?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}$`][匹配所有支持短信功能的号码(手机卡 + 上网卡)] ### 手机卡 #### 匹配所有 -[`^(?:\+?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[0135-9]\d{2}|66\d{2})\d{6}$`][匹配基础运营商] +[`^(?:\+?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}$`][匹配基础运营商] #### 匹配中国移动 -[`^(?:\+?86)?1(?:3(?:4[^9\D]|[5-9]\d)|5[^3-6\D]\d|7[28]\d|8[23478]\d|98\d)\d{7}$`][匹配基础运营商中国移动] +[`^(?:\+?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}$`][匹配基础运营商中国移动] #### 匹配中国联通 -[`^(?:\+?86)?1(?:3[0-2]|[578][56]|66)\d{8}$`][匹配基础运营商中国联通] +[`^(?:\+?86)?1(?:3[0-2]|[578][56]|66|96)\d{8}$`][匹配基础运营商中国联通] #### 匹配中国电信 -[`^(?:\+?86)?1(?:3(?:3\d|49)\d|53\d{2}|8[019]\d{2}|7(?:[37]\d{2}|40[0-5])|9[139]\d{2})\d{6}$`][匹配基础运营商中国电信] +[`^(?:\+?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}$`][匹配基础运营商中国电信] + +#### 匹配中国广电 +[`^(?:\+?86)?192\d{8}$`][匹配基础运营商中国广电] #### 匹配北京船舶通信导航有限公司(海事卫星通信) [`^(?:\+?86)?1749\d{7}$`][匹配北京船舶通信导航有限公司(海事卫星通信)] @@ -96,6 +99,7 @@ https://www.debuggex.com (PCRE 在线视觉化) | 中国移动 | 134-0~8 / 135 / 136 / 137 / 138 / 139 / 150 / 151 / 152 / 157 / 158 / 159 / 172 / 178 / 182 / 183 / 184 / 187 / 188 / 195 / 197 / 198 | | 中国联通 | 130 / 131 / 132 / 155 / 156 / 166 / 175 / 176 / 185 / 186 / 196 | | 中国电信 | 133 / 134-9 / 153 / 173 / 174-00~05 / 177 / 180 / 181 / 189 / 190 / 191 / 193 / 199 | +| 中国广电 | 192 | | 北京船舶通信导航有限公司(海事卫星通信) | 174-9 | | 工业和信息化部应急通信保障中心(应急通信) | 174-06~12 | @@ -148,6 +152,9 @@ https://www.debuggex.com (PCRE 在线视觉化) ## 更新日志 +#### 2020.04.16 +- 添加 192 号段支持。 + #### 2020.04.07 - 添加 172 号段支持。 @@ -199,17 +206,19 @@ MIT [PCRE]: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions -[匹配所有号码(手机卡 + 数据卡 + 上网卡)]: https://www.debuggex.com/r/k6IfZg62IRiasa_Y +[匹配所有号码(手机卡 + 数据卡 + 上网卡)]: https://www.debuggex.com/r/OLNV3F0jAxT_6ToW + +[匹配所有支持短信功能的号码(手机卡 + 上网卡)]: https://www.debuggex.com/r/IivlZsRjoXSX_FJ3 -[匹配所有支持短信功能的号码(手机卡 + 上网卡)]: https://www.debuggex.com/r/cnRdaNTC0eVFl9mS +[匹配基础运营商]: https://www.debuggex.com/r/J1CfULu4yR_8AF9w -[匹配基础运营商]: https://www.debuggex.com/r/wISclg7wpDl9MAgl +[匹配基础运营商中国移动]: https://www.debuggex.com/r/yVWOF0Gglm9xCCqF -[匹配基础运营商中国移动]: https://www.debuggex.com/r/pJB_nwdRmHyhedxq +[匹配基础运营商中国联通]: https://www.debuggex.com/r/ntO95QNIS8SEsHet -[匹配基础运营商中国联通]: https://www.debuggex.com/r/n8onnyBbDV-hN7mU +[匹配基础运营商中国电信]: https://www.debuggex.com/r/liI6MhT97bNIQTp- -[匹配基础运营商中国电信]: https://www.debuggex.com/r/ImjyBMt4S7QcQEP_ +[匹配基础运营商中国广电]: https://www.debuggex.com/r/cFcG0x8htmWNm-xF [匹配北京船舶通信导航有限公司(海事卫星通信)]: https://www.debuggex.com/r/Ewdta8YJfreoXguf diff --git a/README.md b/README.md index 801d4a7..ea1669a 100644 --- a/README.md +++ b/README.md @@ -13,24 +13,27 @@ The mobile number portability(MNP) service in mainland China has been officially ###### If you need POSIX standard regular expressions, [Click here](/POSIX.md). ### Match all numbers (Phone number + IoT number + Data only number) -[`^(?:\+?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[0135-9]\d{2}|6[2567]\d{2}|4(?:[14]0\d{3}|[68]\d{4}|[579]\d{2}))\d{6}$`][Match all numbers (Phone number + IoT number + Data only number)] +[`^(?:\+?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(?:[14]0\d{3}|[68]\d{4}|[579]\d{2}))\d{6}$`][Match all numbers (Phone number + IoT number + Data only number)] ### Match all numbers with SMS (Phone number + Data only number) -[`^(?:\+?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[0135-9]\d{2}|6[2567]\d{2}|4[579]\d{2})\d{6}$`][Match all numbers with SMS (Phone number + Data only number)] +[`^(?:\+?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}$`][Match all numbers with SMS (Phone number + Data only number)] ### Mobile phone number #### Match all -[`^(?:\+?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[0135-9]\d{2}|66\d{2})\d{6}$`][Match Carrier] +[`^(?:\+?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}$`][Match Carrier] #### Match China Mobile -[`^(?:\+?86)?1(?:3(?:4[^9\D]|[5-9]\d)|5[^3-6\D]\d|7[28]\d|8[23478]\d|98\d)\d{7}$`][Match Carrier China Mobile] +[`^(?:\+?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}$`][Match Carrier China Mobile] #### Match China Unicom -[`^(?:\+?86)?1(?:3[0-2]|[578][56]|66)\d{8}$`][Match Carrier China Unicom] +[`^(?:\+?86)?1(?:3[0-2]|[578][56]|66|96)\d{8}$`][Match Carrier China Unicom] #### Match China Telecom -[`^(?:\+?86)?1(?:3(?:3\d|49)\d|53\d{2}|8[019]\d{2}|7(?:[37]\d{2}|40[0-5])|9[139]\d{2})\d{6}$`][Match Carrier China Telecom] +[`^(?:\+?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}$`][Match Carrier China Telecom] + +#### Match China Broadcast Network +[`^(?:\+?86)?192\d{8}$`][Match Carrier China Broadcast Network] #### Match Inmarsat (Satellite Communications) [`^(?:\+?86)?1749\d{7}$`][Match Inmarsat (Satellite Communications)] @@ -98,6 +101,7 @@ https://www.debuggex.com (PCRE visualizer) | China Mobile | 134-0~8 / 135 / 136 / 137 / 138 / 139 / 150 / 151 / 152 / 157 / 158 / 159 / 172 / 178 / 182 / 183 / 184 / 187 / 188 / 195 / 197 / 198 | | China Unicom | 130 / 131 / 132 / 155 / 156 / 166 / 175 / 176 / 185 / 186 / 196 | | China Telecom | 133 / 134-9 / 153 / 173 / 174-00~05 / 177 / 180 / 181 / 189 / 190 / 191 / 193 / 199 | +| China Broadcast Network | 192 | | Inmarsat (Satellite) [2] | 174-9 | | Emergency Communication Support Center of MIIT (Emergency communications) | 174-06~12 | @@ -151,6 +155,9 @@ Since the mobile phone number regular expression is time-sensitive, when any reg ## Release Notes +#### April 16, 2020 +- Add support for 192 prefix. + #### April 7, 2020 - Add support for 172 prefix. @@ -202,17 +209,19 @@ MIT [PCRE]: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions -[Match all numbers (Phone number + IoT number + Data only number)]: https://www.debuggex.com/r/k6IfZg62IRiasa_Y +[Match all numbers (Phone number + IoT number + Data only number)]: https://www.debuggex.com/r/OLNV3F0jAxT_6ToW + +[Match all numbers with SMS (Phone number + Data only number)]: https://www.debuggex.com/r/IivlZsRjoXSX_FJ3 -[Match all numbers with SMS (Phone number + Data only number)]: https://www.debuggex.com/r/cnRdaNTC0eVFl9mS +[Match Carrier]: https://www.debuggex.com/r/J1CfULu4yR_8AF9w -[Match Carrier]: https://www.debuggex.com/r/wISclg7wpDl9MAgl +[Match Carrier China Mobile]: https://www.debuggex.com/r/yVWOF0Gglm9xCCqF -[Match Carrier China Mobile]: https://www.debuggex.com/r/pJB_nwdRmHyhedxq +[Match Carrier China Unicom]: https://www.debuggex.com/r/ntO95QNIS8SEsHet -[Match Carrier China Unicom]: https://www.debuggex.com/r/n8onnyBbDV-hN7mU +[Match Carrier China Telecom]: https://www.debuggex.com/r/liI6MhT97bNIQTp- -[Match Carrier China Telecom]: https://www.debuggex.com/r/ImjyBMt4S7QcQEP_ +[Match Carrier China Broadcast Network]: https://www.debuggex.com/r/cFcG0x8htmWNm-xF [Match Inmarsat (Satellite Communications)]: https://www.debuggex.com/r/Ewdta8YJfreoXguf