Don't ask to ask, just ask | |
PerlMonks |
Re: Comment Removalby saintmike (Vicar) |
on Oct 16, 2005 at 18:26 UTC ( [id://500604]=note: print w/replies, xml ) | Need Help?? |
Your substitution looks for <-- (you might have wanted <!--) and then matches a single character that's not > or <, followed by -->. Probably not what you want.
A simple approach (although by no means 100% reliable) would be
To reliably remove comments from HTML, use HTML::Parser or a related module. Or, even fancier, use File::Comments:
In Section
Seekers of Perl Wisdom
|
|