This looks good at first glance, but it won't do what they need.

Paragraph 1
<p>Paragraph 2</p>
<p>Paragraph 3</p>
Paragraph 4

You will end up with

Paragraph 1
Paragraph 2</p>
<p>Paragraph 3
Paragraph 4

Remember -- .* is /very/ greedy.


--  Ben Doom
    Programmer & General Lackey
    Moonbow Software, Inc

-----Original Message-----
From: Teel, C. Doug [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 31, 2002 3:01 PM
To: CF-Talk
Subject: RE: Call to the regex ninja clan


Try this.  If you need to add more tags just put them in the first set of
parenthesesis in between the pipes.  Thanks Doug

#rereplacenocase('#yourstring#','<(p|font|textformat).*>(.*)<\/\1>','\2','AL
L')#

-----Original Message-----
From: Sean Daniels [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 31, 2002 12:52 PM
To: CF-Talk
Subject: Call to the regex ninja clan


Sending this on behalf of a colleague. I unfortunately do not belong to
the regex ninja clan either.

Begin forwarded message:

> I have some text being sent back from a flash rich text editor. It
> works
> great but flash autogenerates some nasty html that could potentially
> really screw things up...
>
> So.. here is the challenge, I need to remove all the following tags:
>
> <font></font> | <p></p> | <textformat></textformat>
>
> ..and they may have additional attributes. Thanks in advance any who
> can
> solve this brain tickler,
> Brian



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to