Actually, this isn't simple. Offhand, I don't see a way to do this with
regex that isn't more complicated than other methods. What you are
really asking to do is parse an HTML page and selectivly replace tokens.
The easiest way I see to do it -- and this isn't particularly robust --
is to
Thanks Ben, I'm coming to the same conclusion, only after hours of head
scratching.
-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: 07 January 2005 15:08
To: CF-Talk
Subject: Re: Regex again
Actually, this isn't simple. Offhand, I don't see a way to do
This is something you can't do (easily) with regexp. The text means
anything except the characters / s p a n . Remember that that []
matches a SINGLE character. If you want to remove empty span tags, do it
in 4 steps:
1. find empty span tag (no regexp needed)
2. remove it
3. find matching end tag
-
From: Dawson, Michael [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 02, 2004 8:42 PM
To: CF-Talk
Subject: RE: RegEx (again!)
I'm a bit confused. Are you wanting to remove all SPAN tags and leave
everything else?
Can you give an example of what you want the text to look like AFTER the
regex
-
From: Dawson, Michael [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 02, 2004 8:42 PM
To: CF-Talk
Subject: RE: RegEx (again!)
I'm a bit confused. Are you wanting to remove all SPAN tags and leave
everything else?
Can you give an example of what you want the text to look like AFTER
This works well for CFMX, but not so much in CF5 and earlier.
Jerry
Jerry Johnson
Web Developer
Dolan Media Company
[EMAIL PROTECTED] 12/03/04 12:11PM
Actually, this is something you can easily do with RegEx.
reReplaceNoCase(textString, span(.*?)/span, \1,ALL)
Should remove all span and
Could probably do:
reReplaceNoCase(textString, /*span.*?, ,ALL)
-joe
On Fri, 03 Dec 2004 12:09:44 -0500, Jerry Johnson
[EMAIL PROTECTED] wrote:
This works well for CFMX, but not so much in CF5 and earlier.
Jerry
Jerry Johnson
Web Developer
Dolan Media Company
[EMAIL PROTECTED]
A CF version wasn't specified, so I went with what I use.
The problem with this particular RegEx is that the CF 5 Regular
Expression engine doesn't seem to support 'lazy' matching.
On Fri, 03 Dec 2004 12:09:44 -0500, Jerry Johnson
[EMAIL PROTECTED] wrote:
This works well for CFMX, but not so
This won't work if you have nested span tags
-Original Message-
From: Scott Stroz [mailto:[EMAIL PROTECTED]
Sent: 03 December 2004 18:12
To: CF-Talk
Subject: Re: RegEx (again!)
Actually, this is something you can easily do with RegEx.
reReplaceNoCase(textString, span(.*?)/span
I'm a bit confused. Are you wanting to remove all SPAN tags and leave
everything else?
Can you give an example of what you want the text to look like AFTER the
regex operation?
Thanks
-Original Message-
From: Duane Boudreau [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 02, 2004
10 matches
Mail list logo