Hi Aurel, here is a simple replace function
'---------------------------------------
function replace(string t,w,r) as string
'=======================================
'
sys a,b,lw,lr
string s=t
'
lw=len(w)
lr=len(r)
a=1
'
do
a=instr(a,s,w)
if a=0 then exit do
s=left(s,a-1)+r+mid(s,a+lw)
a+=lr
end do
return s
end function
Charles