in reply to Re^3: Finding repeat sequences. (only regex)
in thread Finding repeat sequences.
Nice reversal of the logic and closer:
$s = 'aaaabaaaabaaaaabaaaab';; $s =~ /^((.*?).*?)\2*\1$/ and print "$2/$1";; a/aaaabaaaab
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Finding repeat sequences. (only regex!)
by tye (Sage) on Jun 18, 2013 at 21:17 UTC |