You can do an
refind(text, "\d+", 1, "all")
refind in text digits starting at position one find all

This will return an array of structs with keys pos and len.  Pos is the 
start position, and len is the length.  You can then use mid() to grab them.

--Ben Doom

Web Exp wrote:
> Thanks Ray...
> Ok... I guess I should have clarified that I am using CF MX7, so I
> cannot use reMatch function.
> Also, what I am looking for is to find a list of numbers between the
> strings: "testId" and "Text" in this pattern:
> "testId67Text more text more text testId49Text more text testId54Text
> more text". I need to extract 67,49,54.
> Note: I do not need all the umbers, I want them only if they are
> present in that pattern.
> 
> Thanks,
> K
> 
> On 11/5/07, Raymond Camden <[EMAIL PROTECTED]> wrote:
>> Use the number character class.
>>
>>
>> <cfsavecontent variable="test">
>> testId67Text more text more text testId49Text more text testId54Text more 
>> text
>> </cfsavecontent>
>>
>> <cfset numbers = reMatch("[[:digit:]]+", test)>
>> <cfdump var="#numbers#">
>>
>>
>> On Nov 5, 2007 9:30 AM, Web Exp <[EMAIL PROTECTED]> wrote:
>>> Hi. I have a bunch of text in a db table that has multiple occurances
>>> of this pattern:
>>> "testId67Text more text more text testId49Text more text testId54Text more 
>>> text"
>>>
>>> How can I get all the numbers from it? i need 67,49,54.
>>>
>>> I know it need regex. But I need help.
>>>
>>> Thanks,
>>> K
>>>
>>>
>>
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

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

Reply via email to