Help for this page

Select Code to Download


  1. or download this
    sub find {
        my $self         = shift;
        my @terms        = @_;
        use re 'eval';
        $End_Of_String = 0;
    
  2. or download this
        my @regex_tokens =
          map {
    ...
                qr/\Q$string\E/;
            }
          } @terms;
    
  3. or download this
        my $re       = '(' . join( ')|(', @regex_tokens ) . ')';
        my $compiled = qr/$re/s;
    
  4. or download this
        while (1) {
            my @matches = $self->{buffer} =~ $compiled;
    ...
            }
        }
    }