After I sent my original e-mail, I decided it might be better to stick with
something more along the lines of your original regexp. So the following
will work as well, and actually better, since it will also eliminate your
custom tags if anything other than the tag name is entered (this is
accompl
I did a program once that only allowed certain tags and then removed all
others. It seems easiest to permit the tags you want, and remove all
others, so for your needs, I think the following will suffice:
$allowed_tags = "TYPE|DESCRIPTION";
s/<(?!$allowed_tags).*?>//gis;
I gave t
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"
Sent: Thursday, February 24, 2005 3:01 PM
Subject: Best way to selectively strip HTML tags
I need to strip HTML-styl
- Original Message -
From: "Craig Cardimon" <[EMAIL PROTECTED]>
To: "ActivePerl"
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
I need to strip HTML-style "<" and ">" tags and their contents from
ASCII text while not disturbing customized tags that might say or
. 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 gan