in reply to Re: RexExp help: Highlight keywords in CGI search results, unless inside an HTML tag
in thread RexExp help: Highlight keywords in CGI search results, unless inside an HTML tag
I've never used that explicit lookahead before. I love/hate it when I'm shown something so useful (when I should have known it before). I KNOW I read pp. 228-230 of Mastering Regular Expressions one day last year... :)$text =~ s|($keyword)(?![^<]*[>\Z])|<B>$1</B>|img;
|
|---|