Is there a way to specify a regular expression to match every 2nd occurrence of a pattern in a string?
Examples
Back references can find interesting solutions here. This regex:
([a-z]+).*(\1)
will find the longest repeated sequence.
This one will find a sequence of 3 letters that is repeated:
([a-z]{3}).*(\1)