>>>>>>cFile = Filetostr("C:\mytext.txt") >>>>>> >>>>>>cFile = Strtran(cFile,Chr(202),"E") && using this code i can change only one character at a time >>>>>> >>>>>>cFile = strtran(cFile,"[5]","[05]") && can i use the same approach for character string - perhaps using chrtran?? >>>>>>>>>>>
>>>cFile = strtran(cFile,"[0]","[00]") && if you need to handle [0] >>>cFile = strtran(cFile,"[1]","[01]") >>>cFile = strtran(cFile,"[2]","[02]") >>>cFile = strtran(cFile,"[3]","[03]") >>>cFile = strtran(cFile,"[4]","[04]") >>>cFile = strtran(cFile,"[5]","[05]") >>>cFile = strtran(cFile,"[6]","[06]") >>>cFile = strtran(cFile,"[7]","[07]") >>>cFile = strtran(cFile,"[8]","[08]") >>>cFile = strtran(cFile,"[9]","[09]") >>> >>>* or, if you wanted to do it in "one line of code", you could nest the above calls < eg > >>>>>>Some people might pooh-pooh brute-force solutions, but they have their place.
>lcTest = "aa [1] bb [2] cc [3] aa [1] bb [2] cc [3]" >lcChanged = STRTRAN( lcTest, "[1]", "[01]" ) >lcChanged = STRTRAN( lcChanged, "[2]", "[02]" ) >lcChanged = STRTRAN( lcChanged, "[3]", "[03]" ) >?lcChanged >yes i'm sorry Al - i made the same mistake with other solutions that were offered. k