Help for this page

Select Code to Download


  1. or download this
      DB<6> $x = 'helloworldhellohellohihellohiworldhi'
    
    ...
    hi
    h
    l
    
  2. or download this
      DB<8> print "$1\n" while $x =~ /(\w{2,})(?=.*\1.*\1)/g
    hello
    hello
    hi
    
  3. or download this
    sub repeat_finder_re {
      my $n = shift;
      '(\w{2,})(?=' . ('.*\\1'x($n-1)) . ')'
    }