with whatever modifiers you like. If this regexp won't ever change, I'd add the /o modifier./\b($regexp)\b/
my $regexp = join('|', map quotemeta, keys %temphash);
The presuf() subroutine builds regular expressions out of 'word lists', lists of strings. The regular expression matches the same words as the word list. These regular expressions normally run faster than a simple-minded '|'-concatenation of the words.The larger the wordlist, the higher the gain likely will be.
In reply to Re: Re: how to find hash keys in a string ?
by bart
in thread how to find hash keys in a string ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |