Julia, 62 59 58 bytes
f(s,p,r,_=try)=(try s[[i=findnext(s,c,i+1)for c=p]'],i=r,0end0end;s)=s
I/O is in form of character arrays.
Verification
julia> f(s,p,r,_=try)=(try s[[i=findnext(s,c,i+1)for c=p]'],i=r,0end0end;s)=s
f (generic function with 2 methods)
julia> F(s,p,r)=join(f([s...],[p...],[r...])) # string/char array conversion
F (generic function with 1 method)
julia> F("aacbcbabcccaabcbabcaabbbbca","abaaaccbac","1223334444")
"aacbcbabcccaabcbabcaabbbbca"
julia> F("aacbcbabcccaabcbabcaabbbbcac","abaaaccbac","1223334444")
"1ac2cb2bccc33b3bab4aa4bbbc44"