Help for this page

Select Code to Download


  1. or download this
    my $str = "abcdefghiaabccdjklm";
    print "Input : $str\n";
    1 while $str =~ s/(.)(.*?(?=\g1))((?=.+?\g1)|.)/$2/;
    print "Output: $str\n";