Help for this page

Select Code to Download


  1. 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
    
  2. or download this
    my @runs;
    push @runs, [ $2, $-[2] ] while $s =~ m{ 
      (?: \G | (.) (?! \1)) \K ((.) \3{2,6} (?! \3))
      }xmsg;
    
  3. or download this
    my @runs;                                      
    push @runs, [ $1, $-[1] ] while $sequence =~ m{
      ((.) (?<! (?= \2\2) ..) \2{2,6} (?! \2))     
      }xmsg;