>You just need to add one more case and it must be the FIRST case
>CASE LEFT(lcBuffer,4) == "ADOA"
> ** Do Nothing
>
Try with this source:
....XAD0AD0AD0A.....
....XBR77D0BR77.....
lcBuffer (n) =.....XAD0AD0A
lcBuffer (n+1) = D0A.....
....XBR77D0AD0A.....
and you lose a replacement.
Mix right with left F/R is wrong.
the best way is:
to make the substitution on the buffer,
and to know the last replaced character,
and therefore to leave again from the following one.
But STRTRAN() it doesn't return this information.