The easy answer (for me) is to upgrade to CFMX, which allows "non-greedy"
matches, which are intended to do exactly that.
If you really need to do this, I'd use refind() to locate each instance of
the beginning and ending tags and loop over that, removing them as I find
them.
HTH
-- Ben Doom
Programmer & General Lackey
Moonbow Software, Inc
: -----Original Message-----
: From: David Collie (itndac) [mailto:[EMAIL PROTECTED]
: Sent: Wednesday, March 26, 2003 11:17 AM
: To: CF-Talk
: Subject: RE: RegExp Help
:
:
: Hi all...
:
: All right guys I actually do want to take it a bit further if you don't
: mind... at the moment I only have one set of tags per page... but I was
: starting to think I could use this all over the place and it would be
: very handy...
:
: How would you go about ensuring that it only stripped out between the
: opening and closing tag (if there were multiple) and not the others as
: and not get the mucked up answer as listed below by Ben
:
: Cheers
:
: PS Subscription to CF_RegExp has left my inbox. And yes, they did seem
: like weird questions but I understand why now :-)
:
: -----Original Message-----
: From: Ben Doom [mailto:[EMAIL PROTECTED]
: Sent: 26 March 2003 15:29
: To: CF-Talk
: Subject: RE: RegExp Help
:
:
: Just be aware that if you have a page like
:
: Between <ud_stripout>the waves</ud_stripout> and the shore <ud_stripout>
: there's a boat</ud_stripout> here.
:
: You'll get
: Between here.
: not
: Between and the shore here.
:
: Because that regex will strip /everything/ between the /first/ open and
: the /last/ close. Which is why some of us are asking wierd questions
: about it.
: :-)
:
:
: -- Ben Doom
: Programmer & General Lackey
: Moonbow Software, Inc
:
: : -----Original Message-----
: : From: David Collie (itndac) [mailto:[EMAIL PROTECTED]
: : Sent: Wednesday, March 26, 2003 10:25 AM
: : To: CF-Talk
: : Subject: RE: RegExp Help
: :
: :
: : Hi Neil, Thanks for getting back to me...
: :
: : Your RegExp has done the trick.... well under it and really need to
: : brush up on my RegExp skills but am always put off by the horrible
: ones
: : you see getting used!
: :
: : Much appreciated anyway :-)
: :
: :
: :
: : -----Original Message-----
: : From: Neil Middleton [mailto:[EMAIL PROTECTED]
: : Sent: 26 March 2003 15:01
: : To: CF-Talk
: : Subject: RE: RegExp Help
: :
: :
: : <ud_stripout>.*</ud_stripout>
: :
: : I think, if not, nevermind...
: :
: : Neil
: :
: :
: : > Can anyone help me with the RegExp for stripping out content
: : > between two
: : > defined tags... ie
: : >
: : > <ud_stripout>
: : > ...
: : > Content to strip out
: : > ...
: : > </ud_stripout>
: : >
: : > I would need it to strip out all the content and the tags
: : > themselves as
: : > well...
: :
: :
: :
:
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4