Re: Help With Regular Expressions

2009-05-13 Thread Robert Nurse
I ended up using Replace to change ../geos/displayCountryData.cfm?countryCode=AS to ../geos/AS. Then I used REMatch("../geos/[A-Z]{2}",...) to find all occurrences of this resulting pattern. I then processed each match in the array REMatch returned with Replace(DBText, REMatchArrayEntry, REM

RE: Help With Regular Expressions

2009-05-12 Thread Andy Matthews
end of the link? If everything else is the same, and you just need the last two characters of a link: -Original Message- From: Robert Nurse [mailto:rnu...@gmail.com] Sent: Tuesday, May 12, 2009 11:20 AM To: cf-talk Subject: Help With Regular Expressions Hi All, I'm trying to fi

Re: Help With Regular Expressions

2009-05-12 Thread Barney Boisvert
This is untested, but should be close. REReplace(string, "[a-zA-Z0-9_-]+\.cfm\?code=([A-Z]{2})", "\1.html", "all") find zero or more a-zA-Z0-9_-, then ".cfm?code=", then any two A-Z and replace the whole thing with thos upper case letters plus ".html". If "someCFMFile.cfm" is static, you can re

Help With Regular Expressions

2009-05-12 Thread Robert Nurse
Hi All, I'm trying to find a way of using regular expressions to locate and replace text. My application reads in some text containing links from a DB: e.g. ../folderName/someCFMFile.cfm?code=AB. I want to change all occurrences of this to ../folderName/AB.html. Note that "code" can be any

Re: Help with Regular expressions

2008-02-04 Thread Ian Skinner
Mark Fuqua wrote: > Trying to wrap my head around this and get it to work with the framework I'm > using...what does this say, in words... > > [^a-z0-9] > > does it say characters other than a-z, 0-9 or only characters a-z, o-9? > thanks The ^ character is the 'NOT' operand of regex when used insid

Re: Help with Regular expressions

2008-02-04 Thread Jeff Price
It is saying any character in the set that is not a-z or 0-9. NOTE: He's testing that a bad character is found (instead of that only good characters are found) which should be slightly faster since it can return false at the first bad character found. Make not of the ReFind**NOCASE** :) That co

Re: Help with Regular expressions

2008-02-04 Thread Charlie Griefer
nt: Monday, February 04, 2008 11:32 AM > To: CF-Talk > Subject: RE: Help with Regular expressions > > > > Bad chars > > > Adrian > > -----Original Message- > From: Mark Fuqua > Sent: 04 February 2008 16:30 > To: CF-Talk > Subject: Help with

RE: Help with Regular expressions

2008-02-04 Thread Mark Fuqua
onday, February 04, 2008 11:32 AM To: CF-Talk Subject: RE: Help with Regular expressions Bad chars Adrian -Original Message- From: Mark Fuqua Sent: 04 February 2008 16:30 To: CF-Talk Subject: Help with Regular expressions I need to check and see that a form field has no sp

RE: Help with Regular expressions

2008-02-04 Thread Adrian Lynch
Bad chars Adrian -Original Message- From: Mark Fuqua Sent: 04 February 2008 16:30 To: CF-Talk Subject: Help with Regular expressions I need to check and see that a form field has no special characters or spaces, only 0-9 and a-z. I'm guessing a regular expression cou

Help with Regular expressions

2008-02-04 Thread Mark Fuqua
I need to check and see that a form field has no special characters or spaces, only 0-9 and a-z. I'm guessing a regular expression could do that.? I need a regular expression to do a pattern matching test.if it has anything other than a-z or 0-9 it should fail. Thanks Mark Fuqua ~~

Re: help with regular expressions!

2004-05-14 Thread Robert Bartlett
r 1 | 14/4/2004 15:58:15 > > >I don't think his string has delimiters. > > > >-Original Message- > >From: Dave Francis [mailto:[EMAIL PROTECTED] > >Sent: Friday, May 14, 2004 10:34 AM > >To: CF-Talk > >Subject: Re: help with regular expressions! > > &

Re: help with regular expressions!

2004-05-14 Thread Robert Bartlett
First a couple of observations: If it were me, all of those fields would be in separate fields in the database. Then there would be no need to do what you are doing. However, it that's not an option, change the way you are posting the data so it's a list, and parse it out that way, using a delim

Re: help with regular expressions!

2004-05-14 Thread Dave Francis
every string has delimiters   - Original Message -   From: [EMAIL PROTECTED]   To: CF-Talk   Sent: Friday, May 14, 2004 11:39 AM   Subject: RE: help with regular expressions!   I don't think his string has delimiters.   -Original Message-   From: Dave Francis [mailto:[

Re: help with regular expressions!

2004-05-14 Thread cf coder
limiters. > >-Original Message- >From: Dave Francis [mailto:[EMAIL PROTECTED] >Sent: Friday, May 14, 2004 10:34 AM >To: CF-Talk >Subject: Re: help with regular expressions! > > >Why regex rather than just Replace() or ListGetAt()? >  - Original Message - >  From:

RE: help with regular expressions!

2004-05-14 Thread Jason.Gulledge
I don't think his string has delimiters. -Original Message- From: Dave Francis [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 10:34 AM To: CF-Talk Subject: Re: help with regular expressions! Why regex rather than just Replace() or ListGetAt()?   - Original Message -  

Re: help with regular expressions!

2004-05-14 Thread Dave Francis
Why regex rather than just Replace() or ListGetAt()?   - Original Message -   From: cf coder   To: CF-Talk   Sent: Friday, May 14, 2004 11:15 AM   Subject: help with regular expressions!   Hello Everybody,   I've tried hard to find a solution to my problem but   have had no

help with regular expressions!

2004-05-14 Thread cf coder
Hello Everybody, I've tried hard to find a solution to my problem but have had no luck. I am pulling the data from the 'comments' column in a database table. The data in the comments column looks like this. *** User1 10/28/2003 2:53:52 *** THIS IS A TEST *** User 2 04/06/2003  13:41:47 **

Re: Help with Regular Expressions

2003-10-08 Thread Ben Doom
You could run it on any line that has too many list elements.  That is, if listlen(5) then run the script on it (define it as a UDF and call it). HTH. --Ben ColdFusion Programmer wrote: > Thanks Ben, the problem with that script is that because I'm reading a > log file with 300 plus rows of d

Re: Help with Regular Expressions

2003-10-08 Thread Ben Doom
Try this: string = string & ","; first = find('"', string); second = find('"', string, first + 1); while(first and second) { string = left(string, first) & replace(mid(string, first + 1, second-first), ',', '~', "all") & right(string, len(string) - second); first = find('"', string, se

Re: Help with Regular Expressions

2003-10-08 Thread Ben Doom
The problem is in defining "between quotation marks" because technically in "testuser1","testuser2" the comma *is* between quotation marks.  I can see how you could loop over the string and keep the pairs consistent that way, but I can't off the top of my head think of a way to do it with a sin

Help with Regular Expressions

2003-10-08 Thread Allan Clarke
I want to use a regular _expression_ that finds any commas that are between quotation marks and either escapes them or replaces them Here is an my string. 2003/09/09 14:49:05, "TestUser1", "/Doc/News/Budgeting,Forecasting & Reporting.doc", "OK" As you can see "/Doc/News/Budgeting,Forecasting &