K (ngn/k), 23 16 bytes
-7 bytes by rereading question (specifically, "^
will only appear as ^H
")
{x_/3#-1+x?"^"}/
Removes one instance of ?^H
on each invocation, and is run until convergence (i.e. no more ^
's are present).
{...}/
run function on (implicit) input until it converges-1+x?"^"
get the index of the character immediately prior to the first^
inx
x_/3#
drop the value occurring at that index three times