- or download this
c:\@Work\Perl\monks>perl -wMstrict -le
"use 5.010;
...
CCCCC at offset 14
GGGGGG at offset 21
AAAAAAA at offset 29
- or download this
my @runs;
push @runs, [ $2, $-[2] ] while $s =~ m{
(?: \G | (.) (?! \1)) \K ((.) \3{2,6} (?! \3))
}xmsg;
- or download this
my @runs;
push @runs, [ $1, $-[1] ] while $sequence =~ m{
((.) (?<! (?= \2\2) ..) \2{2,6} (?! \2))
}xmsg;