tune has asked for the wisdom of the Perl Monks concerning the following question:
It is really annoying but I cannot find the right solution to my problem. Maybe it is a very simple regexp, maybe an intermediate one. That means i am a very beginner regexp-user than. Definitely not a hacker :(
When I have some results in a search (HTML), i would like to highlight it. For example:
Good, it works fine... Until there is an URL, and the word is found after href=" but before the ending doublequote. (e.g. <a href="mp3.com/artist">mp3.com/artist</a>, and the search word to highlight is "mp3") It messes the HTML code up.$result =~ s/($seekwrd)/<b>$1</b>/ig;
I don't have a clue what is the right method in this case. Please help! TIA
--
<tune>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Highlight your result
by TheoPetersen (Priest) on Jul 18, 2001 at 20:15 UTC | |
Re: Highlight your result
by voyager (Friar) on Jul 18, 2001 at 20:15 UTC | |
Re: Highlight your result
by gryphon (Abbot) on Jul 18, 2001 at 21:01 UTC | |
Re: Highlight your result
by lshatzer (Friar) on Jul 18, 2001 at 20:18 UTC |