Help for this page

Select Code to Download


  1. or download this
    $s = 'xxaabcdabcabcecdecdxx';
    
    ...
    x 4
    xx 2
    
  2. or download this
    while($s=~/(\w\w+)(?=.*?\1)/g)
    {
    ...
            }
            pos($s) = pos($s) +1 -length $1; # fix
    }