$re = join "|", map {quotemeta} @term;
$results = s{($re)}{$1}ig;
That's just a simple extension of sean's code. If your
search terms are regexps and not plain strings, then
do without the mapping of quotemeta. In reply to Re: Search Term Highlighting
by gnat
in thread Search Term Highlighting
by librarygeek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |