Regex again

2005-01-07 Thread Craig Dudley
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

Re: Regex again

2005-01-07 Thread Ben Doom
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

RE: Regex again

2005-01-07 Thread Craig Dudley
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

RE: RegEx (again!)

2004-12-03 Thread Pascal Peters
; } } } 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

RE: RegEx (again!)

2004-12-03 Thread Duane Boudreau
- 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

Re: RegEx (again!)

2004-12-03 Thread Scott Stroz
- 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

Re: RegEx (again!)

2004-12-03 Thread Jerry Johnson
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

Re: RegEx (again!)

2004-12-03 Thread Joe Rinehart
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]

Re: RegEx (again!)

2004-12-03 Thread Scott Stroz
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

RE: RegEx (again!)

2004-12-03 Thread Pascal Peters
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

RegEx (again!)

2004-12-02 Thread Duane Boudreau
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

RE: RegEx (again!)

2004-12-02 Thread Dawson, Michael
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