in reply to Re^7: Exact string matching
in thread Exact string matching
For repeated substrings and palindromes, you can extract the substrings to test further only from first half of the string. (Because, if it appears only in the second half, it is not repeated nor palindrome.)