Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Advice how to replace special chars with blank
Message
From
09/02/2005 14:59:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
09/02/2005 14:53:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00985315
Message ID:
00985322
Views:
18
A first chrtran() can replace all the desired characters with an empty string. What remains in the result will contain all undesired characters; use it again, with chrtran(), to replace the undesired characters with an empty string. Only the desired characters will remain.

>Hi all,
>
>I have used this line to test and works fine
>
>STRTRAN(ALLTR("xxx'xxxxxx"), "'" , "" ) gives me xxxxxxxxx GOOD output.
>
>what happened if I like to replace everything other THAN THAN
>
>letters,numbers,space,period,dash,underscore,brackets
>A..Z, a..z, 0..9, space, . , - , _ , ()
>
>i.e :
>
>' with blank
>" with blank
>; with blank
>? with blank
>....
>....
>...
>
>in the single process if possible.
>
>Any advice or coding samples would be really appreciated .
>TIA
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform