I need to strip HTML-style "<" and ">" tags and their contents from ASCII text while not disturbing customized tags that might say <TYPE> or <DESCRIPTION>. Is there a way to do this without going bonkers?

I'm using

***

s/<(?:[^>'"]*|(['"]).*?\1)*>//gs;

***

to strip all angle braces from the text. It works like gangbusters, but I've discovered it works a little too well.

Now I need something I can apply more judiciously. Any hints, tips, or suggestions would be appreciated.

--

Craig Cardimon


--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0508-2, 02/23/2005 Tested on: 2/24/2005 9:01:33 AM avast! - copyright (c) 1988-2004 ALWIL Software. http://www.avast.com



_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to