You missed the PS note at the bottom, there is no token identifiers to isolate the substring on, if there were i would have simply removed the substring as per your example.
It maybe as follows also
var %string = t03his text is l04ots of colors a09,07nd other burk c0odes
var %substring = $mid($strip(%string),$pos($strip(%string),ex),9)
; what goes in here to get to below!
;
t03his t!!!this-chunk-missing!!!ts of colors a09,07nd other burk c0odes
The true %substring's are actually defined by a set or rules based apon the contents of the text (stripped) , some are between certain [ ] or ( ) orhers in certain positions etc, but the continuing factor through all of it is that any burk codes may appear anywhere in the unstripped string.