in reply to Substitute within a search

Trying to parse HTML with regular expressions is generally a bad idea. It'll seem to work for a while until someone sends you some valid HTML that you haven't thought about.

The best way is to use an HTML parser like, for example HTML::Parser.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg