I don't have time to write some code to demonstrate the idea, but I wonder if you could use a HoH (hash of hashes) in order to deconstruct the escape sequences, and from there perform your search and replace operations.
In reply to Re: Shooting at a Moving Target
by talexb
in thread Shooting at a Moving Target
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |