Are these all in one big string, or is each user chunk separate?

If it's separate, then something like this would work:

Account: ([0-9]+)

As long as you know that the substring "Account: " will always appear before
the number.
 

-----Original Message-----
From: Spectrum Web [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 16, 2007 11:42 AM
To: CF-Talk
Subject: RegEx to find a number in a string

Hi all. I have a variable which contains an HTTP result and need to find a
number inside that. For example:
1)
User #: 5541855
Name: John Kennedy
Account: 25
Age: 57
City: Boston
.....

I need to find the Account number(25);

2)
User #: 548
Name: Ronald Reagan
Account: 21558485 (user needs to revalidate account number)
Age: 71
City: Houston
.....

I need to find the Account number(21558485); and so on.

Using this code returns that first number(for User #):
getAccount=ReFind("(\b[0-9]+)?\b",initialText,1,'true')>

Cheers



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278284
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to