Reputation: 65
So, if I have a string like 110110110, as you can see that, the sequence 110 is continuously appearing.
110110110
110
Upvotes: 0
Views: 87
Reputation: 13679
here you go
Regex
(\w{3,})\1
Test string
110110111 110111111 a0cc0vaaaabaaaabaaaacaa00bvw
Result
111
aaaab
demo here
regex is based on assumptions that pattern is at least 3 char long
Upvotes: 2