|Perl Monk, Perl Meditation|
I assume that the pattern must repeat at least twice, otherwise, the full string is always the longest answer.
I wish that were the case. It mostly will be, but sometimes the string will consist of 1 complete and 1 partial rep.
But the partial rep at the end *will* exactly match the same number of characters at the beginning of the string, so it will always be possible to determine the rep.
But how to encode that in a regex or at least avoid a brute force chop and compare?
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re^2: Finding repeat sequences. (only mostly regex)