in reply to Substitution Problem

You should really consider using a module like HTML::Parser if you can. It is very difficult to write a regex which matches arbitrary HTML. Consider the Perl Faq entry How do I remove HTML from a string?.