## Python 3 (164 bytes) ## p=0 x=input().split() w=x[0] for i in x[1:]: if i[0]=='+': w=w[:p]+i[1:]+w[p:] p=0 else: p=w[p:].index(i[1:])+p w=w[:p]+w[p:].replace(i[1:],'',1) print(w) Example demonstrating the pointer works (all the examples in the Q work even if you don't factor in the pointer and simply replace on first occurence): Input: HelloThereCowboy -r -e -y +ySays +Oh Output: OhHelloTheCowboySays Edit: Since 2 minutes ago my answer is now invalid according to a comment by the asker. > aaa -b +b would result with aaab because the pointer would go all the > way to the end. I might fix it, I might wait for the rules to get better clarified...