OK, a regular expressions is doing my head in again, can anyone help?
What I'm trying to do is, match and replace all new line characters with
br that are not inside html such as tables or lists, e.g. in the
following string I would not want to add a br while I'm inside the
ordered list.
cfset
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
;
}
}
}
return text;
}
/cfscript
Pascal
-Original Message-
From: Duane Boudreau [mailto:[EMAIL PROTECTED]
Sent: 03 December 2004 01:58
To: CF-Talk
Subject: RegEx (again!)
I thought I was finally catching on to this regex stuff but I guess
not.
I am
-
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 thought I was finally catching on to this regex stuff but I guess not.
I am using a tag from the developer exchange that strips a bunch of extra
html that Word inserts into an HTML document. The text left over leaves a
lot of extra spanxyx/span formatting. Since the opening span is empty
I
6:58 PM
To: CF-Talk
Subject: RegEx (again!)
I thought I was finally catching on to this regex stuff but I guess not.
I am using a tag from the developer exchange that strips a bunch of
extra html that Word inserts into an HTML document. The text left over
leaves a lot of extra spanxyx/span
12 matches
Mail list logo