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:334360
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to