Many websites need to keep a good membership number or use it for future profits. The implementation method is not the scope of this article, this article only lists some of the regular ones used to detect the type of the hot number.
Beautiful number detection: The main can detect the connection number (positive connection 12345, 65432), AABB number, mobile phone number, date number (birthday, annual), Abbcabb, 3 more than repeat number. More type number detection can be modified according to the following expression.
' Match 6-bit shun-increase
Regex. Pattern = "(?: 0 (? =1) | (? =2) (? =3) |3 (? =4) |4 (? =5) |5 (? =6) |6 (? =7) |7 (? =8) |8 (? =9)) {5}\d ")
' Match 6-bit straight-down
Regex. Pattern = "(?: 9 (? =8) |8 (? =7) |7 (? =6) |6 (? =5) |5 (? =4) |4 (? =3) (|3) (?) (? =2) | | (? =1)) {=0]
' Match 6-bit straight up or down
Regex. Pattern = "(?:(?: 0 (? =1) | (? =2) (? =3) |3 (? =4) |4 (? =5) |5 (? =6) |6 (? =7) |7 (? =8) |8 (? =9)) {5}| (?: 9 (? =8) |8 (? =7) |7 (? =6) |6 (? =5) |5 (? =4) |4 (? =3) (?) (?) (? |3) | | (? =2)) {5}) =1 "
Match 4-9-bit sequential numbers
(?:(?: 0 (? =1) | (? =2) (? =3) |3 (? =4) |4 (? =5) |5 (? =6) |6 (? =7) |7 (? =8) |8 (? =9)) {3,}| (?: 9 (? =8) |8 (? =7) |7 (? =6) |6 (? =5) |5 (? =4) |4 (? =3) (?) (?) (? |3) | | (? =2)) {3,}) =1
Matches more than 3 digits of duplicate numbers
([\d]) \1{2,}
Numbers that match date types
(19|20) [\d] {2} (1[0-2]|0?) [1-9]) (31|2[0-9]|1[0-9]|0?) [0-9])
Mobile phone Number class
(13[0-9]|15[0-9]|18[0-9]) ([\d]{2,4}) {2}
Match 33111 types of
([\d]) \1{1,} ([\d]) \2{2,}
Match 5331533 types of
([[\d]) {1,} ([\d]) {1,}) \1{1,}
Matches the 22334,123355 type of
([\d]) \1{1,} ([\d]) \2{1,}
The above are all in Mtracer 2.0 debugging and in the practical application of the adoption, welcome to express their views and share their own technology and experience.
Regular expression to determine the type of mobile phone number Liang