in reply to Search and replace in html

Parsing HTML with regular expressions is not recommended. You should look at HTML::Parser. Also take a look at this node from the FAQ's How do I remove HTML from a string?.