Regular expression Number Liang type judgment code-regular expression
Source: Internet
Author: User
Liang number detection: The main can detect the serial number (even 12345, pour 65432), AABB number, mobile phone number, date number (birthday number, annual number), Abbcabb number, 3-digit repeat number. More types of number detection can be modified according to the following expression.
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 Category
(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,}
Match 22334,123355 type of
([\d]) \1{1,} ([\d]) \2{1,}
The above are all in the Mtracer 2.0 debugging and through the practical application, you are welcome to express their views and share their own skills and experience.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service