Skip to content

Commit 35cf348

Browse files
committed
Add support for 190 / 196 / 197 prefix.
1 parent ba3fc14 commit 35cf348

File tree

4 files changed

+49
-61
lines changed

4 files changed

+49
-61
lines changed

POSIX-CN.md

+12-21
Original file line numberDiff line numberDiff line change
@@ -28,40 +28,40 @@
2828
-->
2929

3030
<!--
31-
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([01356789][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[13589][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}$` |
32-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([01356789][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[13589][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\}$` |
31+
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([01356789][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[01356789][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}$` |
32+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([01356789][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[01356789][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\}$` |
3333
-->
3434

3535
| 命令 | 正则表达式 |
3636
| --- | --- |
37-
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([01356789][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[13589][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}$` |
38-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([01356789][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[13589][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\}$` |
37+
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([01356789][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[01356789][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}$` |
38+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([01356789][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[01356789][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\}$` |
3939

4040
### 匹配所有支持短信功能的号码(手机卡 + 上网卡)
4141

4242
<!--
43-
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([01356789][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[13589][0-9]{2}|6[2567][0-9]{2}|4[579][0-9]{2})[0-9]{6}$` |
44-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([01356789][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[13589][0-9]\{2\}\|6[2567][0-9]\{2\}\|4[579][0-9]\{2\}\)[0-9]\{6\}$` |
43+
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([01356789][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[01356789][0-9]{2}|6[2567][0-9]{2}|4[579][0-9]{2})[0-9]{6}$` |
44+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([01356789][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[01356789][0-9]\{2\}\|6[2567][0-9]\{2\}\|4[579][0-9]\{2\}\)[0-9]\{6\}$` |
4545
-->
4646

4747
| 命令 | 正则表达式 |
4848
| --- | --- |
49-
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([01356789][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[13589][0-9]{2}\|6[2567][0-9]{2}\|4[579][0-9]{2})[0-9]{6}$` |
50-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([01356789][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[13589][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4[579][0-9]\{2\}\)[0-9]\{6\}$` |
49+
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([01356789][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[01356789][0-9]{2}\|6[2567][0-9]{2}\|4[579][0-9]{2})[0-9]{6}$` |
50+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([01356789][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[01356789][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4[579][0-9]\{2\}\)[0-9]\{6\}$` |
5151

5252
### 手机卡
5353

5454
#### 匹配所有
5555

5656
<!--
57-
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([35678][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[13589][0-9]{2}|66[0-9]{2})[0-9]{6}$` |
58-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([35678][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[13589][0-9]\{2\}\|66[0-9]\{2\}\)[0-9]\{6\}$` |
57+
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([35678][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[01356789][0-9]{2}|66[0-9]{2})[0-9]{6}$` |
58+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([35678][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[01356789][0-9]\{2\}\|66[0-9]\{2\}\)[0-9]\{6\}$` |
5959
-->
6060

6161
| 命令 | 正则表达式 |
6262
| --- | --- |
63-
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([35678][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[13589][0-9]{2}\|66[0-9]{2})[0-9]{6}$` |
64-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([35678][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[13589][0-9]\{2\}\\|66[0-9]\{2\}\)[0-9]\{6\}$` |
63+
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([35678][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[01356789][0-9]{2}\|66[0-9]{2})[0-9]{6}$` |
64+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([35678][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[01356789][0-9]\{2\}\\|66[0-9]\{2\}\)[0-9]\{6\}$` |
6565

6666
#### 匹配中国移动
6767

@@ -244,15 +244,6 @@
244244
| GNU BRE | `^\(+\?86\)\?149[0-9]\{8\}$` |
245245

246246

247-
## 更新日志
248-
249-
#### 2019.12.24
250-
- 添加 162 / 193 / 195 号段支持。
251-
252-
#### 2019.01.12
253-
- 发布首个兼容 GNU BRE 和 GNU ERE 的版本。
254-
255-
256247
[PCRE]: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions
257248

258249
[POSIX]: https://en.wikipedia.org/wiki/Regular_expression#Standards

POSIX.md

+12-22
Original file line numberDiff line numberDiff line change
@@ -31,40 +31,40 @@ See https://help.github.com/articles/organizing-information-with-tables/#formatt
3131
-->
3232

3333
<!--
34-
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([01356789][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[13589][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}$` |
35-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([01356789][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[13589][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\}$` |
34+
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([01356789][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[01356789][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}$` |
35+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([01356789][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[01356789][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\}$` |
3636
-->
3737

3838
| Command | Regular Expression |
3939
| --- | --- |
40-
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([01356789][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[13589][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}$` |
41-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([01356789][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[13589][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\}$` |
40+
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([01356789][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[01356789][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}$` |
41+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([01356789][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[01356789][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\}$` |
4242

4343
### Match all numbers with SMS (Phone number + Data only number)
4444

4545
<!--
46-
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([01356789][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[13589][0-9]{2}|6[2567][0-9]{2}|4[579][0-9]{2})[0-9]{6}$` |
47-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([01356789][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[13589][0-9]\{2\}\|6[2567][0-9]\{2\}\|4[579][0-9]\{2\}\)[0-9]\{6\}$` |
46+
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([01356789][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[01356789][0-9]{2}|6[2567][0-9]{2}|4[579][0-9]{2})[0-9]{6}$` |
47+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([01356789][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[01356789][0-9]\{2\}\|6[2567][0-9]\{2\}\|4[579][0-9]\{2\}\)[0-9]\{6\}$` |
4848
-->
4949

5050
| Command | Regular Expression |
5151
| --- | --- |
52-
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([01356789][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[13589][0-9]{2}\|6[2567][0-9]{2}\|4[579][0-9]{2})[0-9]{6}$` |
53-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([01356789][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[13589][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4[579][0-9]\{2\}\)[0-9]\{6\}$` |
52+
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([01356789][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[01356789][0-9]{2}\|6[2567][0-9]{2}\|4[579][0-9]{2})[0-9]{6}$` |
53+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([01356789][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[01356789][0-9]\{2\}\\|6[2567][0-9]\{2\}\\|4[579][0-9]\{2\}\)[0-9]\{6\}$` |
5454

5555
### Mobile phone number
5656

5757
#### Match all
5858

5959
<!--
60-
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([35678][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[13589][0-9]{2}|66[0-9]{2})[0-9]{6}$` |
61-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([35678][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[13589][0-9]\{2\}\|66[0-9]\{2\}\)[0-9]\{6\}$` |
60+
| GNU ERE | `^(+?86)?1(3[0-9]{3}|5[012356789][0-9]{2}|8[0-9]{3}|7([35678][0-9]{2}|4(0[0-9]|1[0-2]|9[0-9]))|9[01356789][0-9]{2}|66[0-9]{2})[0-9]{6}$` |
61+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\|5[012356789][0-9]\{2\}\|8[0-9]\{3\}\|7\([35678][0-9]\{2\}\|4\(0[0-9]\|1[0-2]\|9[0-9]\)\)\|9[01356789][0-9]\{2\}\|66[0-9]\{2\}\)[0-9]\{6\}$` |
6262
-->
6363

6464
| Command | Regular Expression |
6565
| --- | --- |
66-
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([35678][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[13589][0-9]{2}\|66[0-9]{2})[0-9]{6}$` |
67-
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([35678][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[13589][0-9]\{2\}\\|66[0-9]\{2\}\)[0-9]\{6\}$` |
66+
| GNU ERE | `^(+?86)?1(3[0-9]{3}\|5[012356789][0-9]{2}\|8[0-9]{3}\|7([35678][0-9]{2}\|4(0[0-9]\|1[0-2]\|9[0-9]))\|9[01356789][0-9]{2}\|66[0-9]{2})[0-9]{6}$` |
67+
| GNU BRE | `^\(+\?86\)\?1\(3[0-9]\{3\}\\|5[012356789][0-9]\{2\}\\|8[0-9]\{3\}\\|7\([35678][0-9]\{2\}\\|4\(0[0-9]\\|1[0-2]\\|9[0-9]\)\)\\|9[01356789][0-9]\{2\}\\|66[0-9]\{2\}\)[0-9]\{6\}$` |
6868

6969
#### Match China Mobile
7070

@@ -247,16 +247,6 @@ See https://help.github.com/articles/organizing-information-with-tables/#formatt
247247
| GNU BRE | `^\(+\?86\)\?149[0-9]\{8\}$` |
248248

249249

250-
## Release Notes
251-
252-
#### December 24, 2019
253-
- Add support for 162 / 193 / 195 prefix.
254-
255-
256-
#### 2019.01.12
257-
- The first version compatible with POSIX standard (GNU BRE and GNU ERE).
258-
259-
260250
[PCRE]: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions
261251

262252
[POSIX]: https://en.wikipedia.org/wiki/Regular_expression#Standards

README-CN.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
###### 如果你需要 POSIX 标准的正则表达式,[点击这里](/POSIX-CN.md)
1212

1313
### 匹配所有号码(手机卡 + 数据卡 + 上网卡)
14-
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[01356789]\d{2}|4(?:0\d|1[0-2]|9\d))|9[13589]\d{2}|6[2567]\d{2}|4(?:[14]0\d{3}|[68]\d{4}|[579]\d{2}))\d{6}$`][匹配所有号码(手机卡 + 数据卡 + 上网卡)]
14+
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[01356789]\d{2}|4(?:0\d|1[0-2]|9\d))|9[01356789]\d{2}|6[2567]\d{2}|4(?:[14]0\d{3}|[68]\d{4}|[579]\d{2}))\d{6}$`][匹配所有号码(手机卡 + 数据卡 + 上网卡)]
1515

1616
### 匹配所有支持短信功能的号码(手机卡 + 上网卡)
17-
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[01356789]\d{2}|4(?:0\d|1[0-2]|9\d))|9[13589]\d{2}|6[2567]\d{2}|4[579]\d{2})\d{6}$`][匹配所有支持短信功能的号码(手机卡 + 上网卡)]
17+
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[01356789]\d{2}|4(?:0\d|1[0-2]|9\d))|9[01356789]\d{2}|6[2567]\d{2}|4[579]\d{2})\d{6}$`][匹配所有支持短信功能的号码(手机卡 + 上网卡)]
1818

1919
### 手机卡
2020

2121
#### 匹配所有
22-
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[35678]\d{2}|4(?:0\d|1[0-2]|9\d))|9[13589]\d{2}|66\d{2})\d{6}$`][匹配基础运营商]
22+
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[35678]\d{2}|4(?:0\d|1[0-2]|9\d))|9[01356789]\d{2}|66\d{2})\d{6}$`][匹配基础运营商]
2323

2424
#### 匹配中国移动
2525
[`^(?:\+?86)?1(?:3(?:4[^9\D]|[5-9]\d)|5[^3-6\D]\d|8[23478]\d|(?:78|98)\d)\d{7}$`][匹配基础运营商中国移动]
@@ -93,9 +93,10 @@ https://www.debuggex.com (PCRE 在线视觉化)
9393

9494
| 运营商 <sup>[1]<sup/> | 号段 |
9595
| --- | --- |
96-
| 中国移动 | 134-0~8 / 135 / 136 / 137 / 138 / 139 / 150 / 151 / 152 / 157 / 158 / 159 / 178 / 182 / 183 / 184 / 187 / 188 / 195 / 198 |
97-
| 中国联通 | 130 / 131 / 132 / 155 / 156 / 166 / 175 / 176 / 185 / 186 |
98-
| 中国电信 | 133 / 134-9 / 153 / 173 / 174-00~05 / 177 / 180 / 181 / 189 / 191 / 193 / 199 |
96+
| 中国移动 | 134-0~8 / 135 / 136 / 137 / 138 / 139 / 150 / 151 / 152 / 157 / 158 / 159 / 178 / 182 / 183 / 184 / 187 / 188 / 195 / 197 / 198 |
97+
| 中国联通 | 130 / 131 / 132 / 155 / 156 / 166 / 175 / 176 / 185 / 186 / 196 |
98+
| 中国电信 | 133 / 134-9 / 153 / 173 / 174-00~05 / 177 / 180 / 181 / 189 / 190 / 191 / 193 / 199 |
99+
| 中国广电 | 192 |
99100
| 北京船舶通信导航有限公司(海事卫星通信) | 174-9 |
100101
| 工业和信息化部应急通信保障中心(应急通信) | 174-06~12 |
101102

@@ -148,6 +149,9 @@ https://www.debuggex.com (PCRE 在线视觉化)
148149

149150
## 更新日志
150151

152+
#### 2019.12.26
153+
- 添加 190 / 196 / 197 号段支持。
154+
151155
#### 2019.12.24
152156
- 添加 162 / 193 / 195 号段支持。
153157

@@ -193,11 +197,11 @@ MIT
193197

194198
[PCRE]: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions
195199

196-
[匹配所有号码(手机卡 + 数据卡 + 上网卡)]: https://www.debuggex.com/r/bI_nSAY542fXCKTU
200+
[匹配所有号码(手机卡 + 数据卡 + 上网卡)]: https://www.debuggex.com/r/bGTEJTtkPpRBGGmZ
197201

198-
[匹配所有支持短信功能的号码(手机卡 + 上网卡)]: https://www.debuggex.com/r/Wm42QqxS69C4FyYU
202+
[匹配所有支持短信功能的号码(手机卡 + 上网卡)]: https://www.debuggex.com/r/AT6yjr-CCHDJ8Zzp
199203

200-
[匹配基础运营商]: https://www.debuggex.com/r/SARQVQHK81YkIVBw
204+
[匹配基础运营商]: https://www.debuggex.com/r/MdCwnbmyRqFWFCWT
201205

202206
[匹配基础运营商中国移动]: https://www.debuggex.com/r/dbF9BmNrGrq4vvWi
203207

README.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ The mobile number portability(MNP) service in mainland China has been officially
1313
###### If you need POSIX standard regular expressions, [Click here](/POSIX.md).
1414

1515
### Match all numbers (Phone number + IoT number + Data only number)
16-
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[01356789]\d{2}|4(?:0\d|1[0-2]|9\d))|9[13589]\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)]
16+
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[01356789]\d{2}|4(?:0\d|1[0-2]|9\d))|9[01356789]\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)]
1717

1818
### Match all numbers with SMS (Phone number + Data only number)
19-
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[01356789]\d{2}|4(?:0\d|1[0-2]|9\d))|9[13589]\d{2}|6[2567]\d{2}|4[579]\d{2})\d{6}$`][Match all numbers with SMS (Phone number + Data only number)]
19+
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[01356789]\d{2}|4(?:0\d|1[0-2]|9\d))|9[01356789]\d{2}|6[2567]\d{2}|4[579]\d{2})\d{6}$`][Match all numbers with SMS (Phone number + Data only number)]
2020

2121
### Mobile phone number
2222

2323
#### Match all
24-
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[35678]\d{2}|4(?:0\d|1[0-2]|9\d))|9[13589]\d{2}|66\d{2})\d{6}$`][Match Carrier]
24+
[`^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7(?:[35678]\d{2}|4(?:0\d|1[0-2]|9\d))|9[01356789]\d{2}|66\d{2})\d{6}$`][Match Carrier]
2525

2626
#### Match China Mobile
2727
[`^(?:\+?86)?1(?:3(?:4[^9\D]|[5-9]\d)|5[^3-6\D]\d|8[23478]\d|(?:78|98)\d)\d{7}$`][Match Carrier China Mobile]
@@ -95,9 +95,9 @@ https://www.debuggex.com (PCRE visualizer)
9595

9696
| Carrier <sup>[1]<sup/> | Prefix |
9797
| --- | --- |
98-
| China Mobile | 134-0~8 / 135 / 136 / 137 / 138 / 139 / 150 / 151 / 152 / 157 / 158 / 159 / 178 / 182 / 183 / 184 / 187 / 188 / 195 / 198 |
99-
| China Unicom | 130 / 131 / 132 / 155 / 156 / 166 / 175 / 176 / 185 / 186 |
100-
| China Telecom | 133 / 134-9 / 153 / 173 / 174-00~05 / 177 / 180 / 181 / 189 / 191 / 193 / 199 |
98+
| China Mobile | 134-0~8 / 135 / 136 / 137 / 138 / 139 / 150 / 151 / 152 / 157 / 158 / 159 / 178 / 182 / 183 / 184 / 187 / 188 / 195 / 197 / 198 |
99+
| China Unicom | 130 / 131 / 132 / 155 / 156 / 166 / 175 / 176 / 185 / 186 / 196 |
100+
| China Telecom | 133 / 134-9 / 153 / 173 / 174-00~05 / 177 / 180 / 181 / 189 / 190 / 191 / 193 / 199 |
101101
| Inmarsat (Satellite) <sup>[2]<sup/> | 174-9 |
102102
| Emergency Communication Support Center of MIIT (Emergency communications) | 174-06~12 |
103103

@@ -151,6 +151,9 @@ Since the mobile phone number regular expression is time-sensitive, when any reg
151151

152152
## Release Notes
153153

154+
#### December 26, 2019
155+
- Add support for 190 / 196 / 197 prefix.
156+
154157
#### December 24, 2019
155158
- Add support for 162 / 193 / 195 prefix.
156159

@@ -196,11 +199,11 @@ MIT
196199

197200
[PCRE]: https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions
198201

199-
[Match all numbers (Phone number + IoT number + Data only number)]: https://www.debuggex.com/r/bI_nSAY542fXCKTU
202+
[Match all numbers (Phone number + IoT number + Data only number)]: https://www.debuggex.com/r/bGTEJTtkPpRBGGmZ
200203

201-
[Match all numbers with SMS (Phone number + Data only number)]: https://www.debuggex.com/r/Wm42QqxS69C4FyYU
204+
[Match all numbers with SMS (Phone number + Data only number)]: https://www.debuggex.com/r/AT6yjr-CCHDJ8Zzp
202205

203-
[Match Carrier]: https://www.debuggex.com/r/SARQVQHK81YkIVBw
206+
[Match Carrier]: https://www.debuggex.com/r/MdCwnbmyRqFWFCWT
204207

205208
[Match Carrier China Mobile]: https://www.debuggex.com/r/dbF9BmNrGrq4vvWi
206209

0 commit comments

Comments
 (0)