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;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Comment Removal
by saintmike (Vicar) on Oct 16, 2005 at 18:26 UTC | |
Re: Comment Removal
by rnahi (Curate) on Oct 16, 2005 at 20:26 UTC | |
Re: Comment Removal
by pg (Canon) on Oct 16, 2005 at 18:28 UTC | |
Re: Comment Removal
by TedPride (Priest) on Oct 17, 2005 at 03:39 UTC | |
by halley (Prior) on Oct 17, 2005 at 15:08 UTC | |
Re: Comment Removal
by ambrus (Abbot) on Oct 16, 2005 at 21:50 UTC | |
Re: Comment Removal
by gube (Parson) on Oct 17, 2005 at 04:58 UTC | |
by rnahi (Curate) on Oct 17, 2005 at 06:02 UTC | |
Re: Comment Removal
by saskaqueer (Friar) on Oct 17, 2005 at 15:24 UTC | |
by fireartist (Chaplain) on Oct 17, 2005 at 20:06 UTC | |
Re: Comment Removal
by Spidy (Chaplain) on Oct 17, 2005 at 23:07 UTC |
Back to
Seekers of Perl Wisdom