Description
([0-9]{2,})\1+

This regex will do the following:
- Find substrings consisting of two or more digits repeating 1 or more times in a row.
Example
Live demo
https://regex101.com/r/cA5qB7/1
Sample text
22222 1111 2323 12341234 123123123123 123123123 1 11 1212 14 14 12345
Matching Examples
- Capture group 0 gets the entire matched row, including all retries
- Capture Group 1 receives a substring
[0][0] = 2222 [0][1] = 22 [1][0] = 1111 [1][1] = 11 [2][0] = 2323 [2][1] = 23 [3][0] = 12341234 [3][1] = 1234 [4][0] = 123123123123 [4][1] = 123123 [5][0] = 123123123 [5][1] = 123 [6][0] = 1212 [6][1] = 12
Explanation
NODE EXPLANATION ---------------------------------------------------------------------- ( group and capture to \1: ---------------------------------------------------------------------- [0-9]{2,} any character of: '0' to '9' (at least 2 times (matching the most amount possible)) ---------------------------------------------------------------------- ) end of \1 ---------------------------------------------------------------------- \1+ what was matched by capture \1 (1 or more times (matching the most amount possible)) ----------------------------------------------------------------------
source share