Have you looked at CHRTRAN() function?
? CHRTRAN("Hello, world", "oHle", "DACB")
yields the output
ABCCD, wDrCd
'o' replaced with 'D'
'H' replaced with 'A'
'l' replace with 'C'
'e' replaced with 'B'
? CHRTRAN("Hello, world", " ,oHle", "YX")
yields the output
XYwrd
' ' replaced with 'Y'
',' replaced with 'X'
'o', 'H', 'l', and 'e' are replaced by empty string
>Hello comunity,
>
>I have build a program that import into VFP cursor fields from excel file.
>my cursor have 2 field : REF C(18) and Price N(10,2)
>
>But on my column REF i have value like :
>A 123
>100 235
>100-001
>100|300
>
>I need a VFP function to remove blank space or - or | or other patterns that i can choose to update my cursor field REF.
>I dont know if i can do it using STUFF function selecting a range of pattern , for example [ ' '-&| ], of course after select my cursor and doing a SCAN on it to replace each line.
>
>Someone coudl give me a simple example to do this?
>
>Many thanks,
>Best regards,
>Luis