Thank you. I'll try it.

By the way, how is your first name pronounced?

Petr Vileta wrote:
----- Original Message ----- From: "Craig Cardimon" <[EMAIL PROTECTED]>
To: "ActivePerl" <[email protected]>
Sent: Thursday, February 24, 2005 3:01 PM
Subject: Best way to selectively strip HTML tags




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;

***


Try this

s/(<)(\/{0,1})(description|type)(>)/[$2$3]/igs;
s/<.+?>/ /igs;
s/\x32+/ /igs;
s/(\[)(\/{0,1})(description|type)(\])/[$2$3]/igs;

Petr Vileta, Czech republic

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


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





--

Craig Cardimon
AUS INC.
(Knowledge Express Data Systems; 1-800-529-5337, ext. 24)


--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0508-2, 02/23/2005 Tested on: 2/24/2005 10:29:15 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