In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-12-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the regular expression how to match consecutive numbers, the article is very detailed, has a certain reference value, interested friends must read it!
The requirements for implementation are as follows:
Pure number
Between 5 and 7 digits
The first three are the same.
Continuous from the fourth place.
Such as the following example:
11123 # correct 22234 # correct 33345 # correct 2223456 # correct 0001234 # correct 00012345 # error: the length of this line exceeds the standard 000234 # error: bit 3 and bit 4 are not contiguous 111235 # error: bit 5 and bit 6 are not contiguous
1. Match three identical digits
(\ d)\ 1 {2}
2. Match consecutive digits
Matching consecutive numbers can be matched by zero-width assertions, of course, there is no good way, can only be enumerated, the following two lines can match 3 consecutive digits
(0 (? = 1) | 1 (? = 2) | 2 (3) | 3 (4) | 4 (5) | 5 (6) | 6 (7) | 7 (8) | 8 (9)) {2}\ d\ d ((?)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.