How can i find pair of any two letters that appears at least twice in the string without overlapping?
For example, in the string '
Your string does not necessarily end after finding
\1. So you are getting nothing. You can use