lisaw has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I am working on a small, flat, text-based program that allows a user to cut and paste html into an entry. I am trying to figure out how to remove comments that might happen to be in the pasted html...for example:
I've tried this but it doesn't work:<B>Hello World</B> <!-- This comment would need to be removed from the entry --> <font color=red>It is Sunday!</FONT>
Any suggestions? Thank you!!$question =~ s/<--[^<>]-->//g;
Back to
Seekers of Perl Wisdom