Leaves table tags in:

<cfset
VariableWithTags=#REReplaceNoCase(VariableWithTags,'<table>([[:alpha:]]|[[:s
pace:]]|[[:punct:]])+</table>','<table></table>')#>


Removes table tags:

<cfset
VariableWithTags=#REReplaceNoCase(VariableWithTags,'<table>([[:alpha:]]|[[:s
pace:]]|[[:punct:]])+</table>','')#>


Note that the default attribute for scope is "one", so the above snippet
will only remove the first instance it finds of table tags.  Change the
scope to "all" if you want them all gone.

Of course, if you only want one very specific table tag set to be removed,
you'll have to find it another way (adding some other unique text for the
regexp to look for).


Douglas Malcolm



-----Original Message-----
From: Jeff Britts [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 11:50 AM
To: CF-Talk
Subject: Regular expression help


Help for a regular expression idiot.

I'm looking to remove all the characters between two tags:

example
from: <table> asldfj lskdf jaskldf jklasdf jlaskdfj lasdkf </table>

to: <table></table>


(removing the tags themselves would be a plus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to