Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    use warnings;
    ...
    
    s/((.)\2\2)\2*/$1/g;
    print;
    
  2. or download this
      (                        group and capture to \1:
    ----------------------------------------------------------------------
        (                        group and capture to \2:
    ...
    ----------------------------------------------------------------------
      \2*                      what was matched by capture \2 (0 or more
                               times (matching the most amount possible))