>Not to seem ignorant...foxtools? what's that? and where do I get it?
>Thanks for your reply:)
>
>>
>>Hi John,
>>
>>The first idea that comes to mind requires foxtools. It contains a function, StrFilter(). You'd use it this way:
>>
>>lcnumbers = StrFilter("#70 blue", "0123456789")
>>
>>lcnumbers would then equal "70".
FoxTools is free for FFDB club members :)
The first idea that came to my mind is that you may have more than one number in your string, so this is what I'd do in that case - I'd include the digits and a space in the string, so:
lcNumbers=StrFilter("#70 blue #23 green #00 amber" , " 0123456789")
for i=1 to words(lcNumbers)
? val(wordnum(lcNumbers,i))
endfor
It should print
70
23
0
A word of caution: Foxtools functions are not working with strings longer than 255 or with memo fields in some versions of VFP - for memos, though, it's no problem - just use ""+memofield as parameter.