Help for this page

Select Code to Download


  1. or download this
    my $len = 0;
    my $best = "";
    ...
    }
    
    print "best: $best\n"
    
  2. or download this
    my $best = "";
    while ($string =~ /((.)\2+)/g) {
    ...
    }
    
    print "best: $best\n"
    
  3. or download this
    my $best = "";
    $best = $1 while $string =~ /((.)\2*)(*SKIP)(?(?{length $^N <= length 
    +$best})(*FAIL))/g;
    
    print "best: $best\n"