Help for this page

Select Code to Download


  1. or download this
    my $re = qr/((.)\2+)/;
    
  2. or download this
    $ perl -e'my $re = qr/((.)\2+)/; $_="aabccccdddeffff"; while (m/$re/g)
    + { printf "\"%s\" x %d\n", $2, length($1) }'
    "a" x 2
    ...
    "d" x 3
    "f" x 4
    $
    
  3. or download this
    use re 'eval';
    
    ...
    
    __END__
    c x 4 at 3