>Instead of your SUBSTR() + STRTRAN() use STUFF() (you know where the string
>is and how long it is). It's faster.
>
>Vlad
>
Besides, no need for double replaces - use RATC to find all the
occurences from right to left, and do the search up to the left of the
position of the last find, or use RATC(sstr, memo, nOccurence) - the
third parameter may be used just fine (but not in this scenario). I've
had a situation when I needed some multiple replacement of a string
within a long memo, and I ended up marking (saving into an array) the
positions of all the occurences, then STUFFing the new string into the
marked positions from last to first, so the positions don't move.