do input""a$,b$,c$ if""=a$end i=rinstr(c$,a$) if i?mid$(c$,1,i-1),b$,mid$(c$,i+len(a$)) if!i?c$ loop