Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to parse numbers only from a string?
Message
From
03/12/2002 06:00:26
 
 
To
02/12/2002 23:37:53
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00728861
Message ID:
00728932
Views:
21
Hi Henry.

Problem is that the phone number has been declared as numeric and padL might not work.

Really? Why? Exactly how many mathemetical computations do you do with telephone numbers < s > ?

Having said that, PADL() will still work with numeric data, but it has the effect of transforming it into character data.

Also, just an FYI, you can use the STRFILTER function in FoxTools to accomplish the same thing that Nadja an Gerald have showed you with CHRTRAN:

SET LIBRARY TO FOXTOOLS ADDITIVE
lcNewString = STRFILTER( lcOldString, '0123456789' )
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform