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?
In reply to Re^2: Finding repeat sequences. (only mostly regex)
by BrowserUk
in thread Finding repeat sequences.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |