Help for this page

Select Code to Download


  1. or download this
    my %seen;
    
    ...
    {
        ++$seen{$1}, pos($string) -= length($1) - 1 while $string =~ /(\w{
    +$len})/g;
    }
    
  2. or download this
    ----------------------------------------------------------------------
      (?{$seen{$1}++})         run this block of Perl code
    ----------------------------------------------------------------------
      (?!)                     fail
    ----------------------------------------------------------------------
    
  3. or download this
    (*FAIL) (*F) 
    
    This pattern matches nothing and always fails. It can be used to force
    + the engine to backtrack. It is equivalent to (?!), but easier to rea
    +d. In fact, (?!) gets optimised into (*FAIL) internally.
    
  4. or download this
    $string =~ /(\w{2,})(?{$seen{$1}++})(?!)/;