I laugh at the challenge presented by this regex.  It is no match for my
awesome ninja skillz.

Two notes:

1)  This is not tested, so may have typos or things I didn't think about,
but it's pretty simple and unlikely to be broken.

2) This may need to be edited a bit based on the language they are using.

Basically you want to do something along the lines of:

newtext = rereplacenocase(text, '</?(p|font|textformat)[^>]*>', 'all');

The regex should work in cf5, cfmx, or anything "perlish" and (likely) most
other things.

Just a reminder, if you ever need us ninjas again:
http://www.houseoffusion.com/cf_lists/index.cfm?method=threads&forumid=21
Read, Post to, or Join the list here for all your RegEx needs.  :-)

And I fade into the shadows......

  --Ben Doom
    Programmer & General Lackey
    Moonbow Software

: -----Original Message-----
: From: Sean Daniels [mailto:[EMAIL PROTECTED]]
: Sent: Tuesday, December 31, 2002 1: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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to