Help for this page

Select Code to Download


  1. or download this
    $string =~
    s/([^\s\.\]\[]+)/exists($tokens_to_match{lc $1}) ? $tokens_to_match{lc
    + $1} : $1/ge;
    
  2. or download this
    my $str  = join '|',
      sort { length $b <=> length $a || $a cmp $b } keys %tokens_to_match;
    ...
          : $2
        )
      /gei;