Help for this page

Select Code to Download


  1. or download this
    local our %count;
    $str =~ /
    ...
        (?{ ($count{$1} ||= 1)++ })
        (?!)
    /x;
    
  2. or download this
    my $min_len = 2; # Substring is at least two chars long.
    my $min_count = 3; # Substring occures at least three times.
    ...
      (?{ ($count{$1} ||= $min_count-1)++ })
      (?!)
    /x;