Tracy,
chrtran() is "normally" supposed to substitute one character for another.
? chrtran( lcText, "ABC", "DEF" ) && change A to D, B to E and C to F
An empty third argument allows all of the second argument characters to be removed. And I think this is how most calls to chrtran() are used.
If your intput might contain other characters like - or () and you don't want to have to worry about all possible "bad" characers to filter out you can instead us a "good" character list with two chrtran calls:
lcGoodCharacters = "0123456789."
? chrtran( lcText, chrtran( lcText, lcGoodCharacters, "" ), "" )
the inner chrtran() gives out a list of all of the bad characters, that the outer chrtran() then removes from the string.
>Thanks Sergey. I looked up CHRTRAN() in help, but I didn't see where it would replace more than one value. I missed that! I tested the same code using STRTRAN() and mvalue remained the same with no substitutions... That's my memory for ya! Useless! :o)