正则表达式:匹配手机靓号
序号 | 规则 | 正则表达式 |
---|---|---|
01 | 尾数不是4的 | \d+[^4]$ |
02 | 不能含4的 | [0-35-9]{11} |
03 | AABB尾号 | ^\d+(\d)(?!\1)(\d)\2((?!\2)\d)\3$ |
04 | AAA尾号 | ^\d+(\d)(?!\1)(\d)\2{2}$ |
05 | AAA非尾号 | ^(\d)+(?!\1)(\d)\2{2}(?!\2)\d+$ |
06 | AAA不限位 | ^(\d)+(?!\1)(\d)\2{2}(?!\2)\d*$ |
07 | AAAB尾号 | (\d)+(?!\1)(\d)\2{2}((?!\2)\d)$ |
08 | ABAB尾号 | ^\d{7}(\d)((?!\1)\d)\1\2$ |
09 | AABA尾号 | ^\d{7}(\d)\1((?!\1)\d)\1$ |
10 | ABAA尾号 | ^\d{7}(\d)((?!\1)\d)\1{2}$ |
11 | ABBA尾号 | ^\d{7}(\d)((?!\1)\d)\2\1$ |
12 | ABCC尾号 | `^\d{7}(\d)((?!\1)\d)((?!\1 |
13 | AABBB不限位 | (\d)\1{1,}(\d)\2{2,} |
14 | ABBABB,AABAAB不限位 | ((\d)\2*(?!\2)(\d)\3*)\1+ |
15 | AABB,AAABB,AABBB不限位 | (\d)\1{1,}(\d)\2{1,} |
16 | 3位以上的重复数字 | (\d)\1{2,} |
17 | 6位顺增 | `(?:0(?=1) |
18 | 3位以上顺增 | `(?:0(?=1) |
19 | 6位顺降 | `(?:9(?=8) |
20 | 6位顺增或顺降 | `(? |
版权声明:本文为zhaoshujie原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。