Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing Unwanted Characters
Message
 
 
To
16/06/2004 19:41:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00914492
Message ID:
00914496
Views:
18
This message has been marked as the solution to the initial question of the thread.
>How would I programatically remove any characters that are not numbers from a character field? I have a table to merge with existing data, but the phone numbers need to be 10 characters long (no parentheses, hyphens, or spaces).
>
>data.phone_no is a character type field currently "(123) 456-7890"
>It must be changed to "1234567890"


REPLACE ALL data.phone WITH CHRTRAN(data.phone, CHRTRAN(data.phone , "01234567890", ""), "")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform