I'm wrong. I re-read it and it says "query fields" which when I first read I took as database column. My mistake. And sorry Debbie. She, not he. *_*
On Tue, Jun 8, 2010 at 11:18 AM, Bobby Hartsfield <[email protected]>wrote: > > Oh. I never saw mention of that... and I think it's a she ;-) > > .:.:.:.:.:.:.:.:.:.:.:.:.:. > Bobby Hartsfield > http://acoderslife.com > > > -----Original Message----- > From: Michael Grant [mailto:[email protected]] > Sent: Tuesday, June 08, 2010 11:06 AM > To: cf-talk > Subject: Re: RegEx help > > > I think he wants to make it part of the t-sql code. > > Do you really need to test for all three of these? Will there ever be a > carriage return in the Age value that's valid? If not why not just test for > the carriage return alone as the end part of your regex? > > > On Tue, Jun 8, 2010 at 11:01 AM, Bobby Hartsfield > <[email protected]>wrote: > > > > > If you mean test for that exact order of those three characters, you > don't > > really need a regex for that. It is just a constant string. > > > > I believe it would be > > > > #Chr(13) & chr(10) & ' '# > > > > > > > > .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. > > Bobby Hartsfield > > http://acoderslife.com > > > > -----Original Message----- > > From: Debbie Morris [mailto:[email protected]] > > Sent: Tuesday, June 08, 2010 10:23 AM > > To: cf-talk > > Subject: RE: RegEx help > > > > > > Thanks for the help, Jason and Andy. Turns out the character apparently > > isn't a tab though. Viewing it in WireShark, it looks like there is a > > carriage return (0d), a line feed (0a) and a space (20) between the age > and > > gender strings. > > > > Sorry to be so dumb, but I've managed to avoid regular expressions for > the > > most part, so I'm really clueless now that I need it. I've tried reading > > through the documentation but it all seems like Greek to me. How can I > test > > for the combination of those three characters? > > > > Deb > > > > -----Original Message----- > > From: Jason Fisher [mailto:[email protected]] > > Sent: Monday, June 07, 2010 4:27 PM > > To: cf-talk > > Subject: RE: RegEx help > > > > > > Assuming that those are tabs between the elements, the following will > > expand on Andy's suggestion. > > > > <cfset testString = "Case Information Problem:diff breathing > Patients:1 > > Four commandment > > Information Age:2 months Gender:Female Conscious:Yes Brea" /> > > <cfset test = reFind("Age:([0-9a-zA-Z ]+)\t", testString, 1, true) /> > > <cfoutput>#mid(testString, test.pos[2], test.len[2])#</cfoutput> > > > > ---------------------------------------- > > > > From: "Andy Matthews" <[email protected]> > > Sent: Monday, June 07, 2010 3:32 PM > > To: "cf-talk" <[email protected]> > > Subject: RE: RegEx help > > > > If you can always depend on Age: before the desired string, and what > looks > > like a tab afterwards, then it's trivial: > > > > Age:[0-9a-Z]+\t > > > > That assumes that the age will be any combination of letters and numbers, > > and also allows for upper and lower case. > > > > andy > > > > -----Original Message----- > > From: Debbie Morris [mailto:[email protected]] > > Sent: Monday, June 07, 2010 1:51 PM > > To: cf-talk > > Subject: RegEx help > > > > I need to extract a particular piece of data from one of my query fields > > and > > I'm not sure how to go about it. > > > > We have incidents in one table that can have comments in another table > > associated with them. > > > > Here's an example of one of the comments in my query results that I need > > to > > grab data from: > > > > Case Information Problem:diff breathing Patients:1 Four commandment > > Information Age:2 months Gender:Female Conscious:Yes Brea > > > > I need to get the Age information for any comments that contain it. The > > Age > > field always begins as shown above and the Gender field always > immediately > > follows it, so I'm assuming I can work from that, but I just don't know > > how > > to go about writing it. Any thoughts would be greatly appreciated!! > > > > Deb > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334364 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

