Skip to main content
2 of 2
deleted 7 characters in body
coltim
  • 6.1k
  • 7
  • 13

K (ngn/k), 23 16 bytes

-7 bytes by rereading question (specifically, "^ will only appear as ^H")

{x_/3#-1+x?"^"}/

Try it online!

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 ^ in x
  • x_/3# drop the value occurring at that index three times
coltim
  • 6.1k
  • 7
  • 13