For exampleaaabccc11fdsa
This string, I want to match strings like aaa, ccc and 11 that will be repeated more than twice. What should I do? If regular expressions can't do it, are there any other PHP or Python built-in functions that can do it? If there are no built-in functions, can we only write the algorithm by hand?
You can match it with a simple regular expression. I only know js.
JS code:
Among them,
.
in the regular expression means any character{2,}
means matching twice or more.