Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -wl
    use strict;
    ...
        *_ = \substr $_, pos()-4 while s/(.)(...)\1/A$2B/;
    }
    print $str;
    
  2. or download this
        my $i = 0;
        *_ = \substr $str, $i while s/(.)(...)\1(?{ $i += pos() - 4 })/A$2
    +B/;