If I understand this approach correctly, you first locate and remove all escape sequences, then wrap the text, and then restore the escape sequences. But after the text has been wrapped, the string has been modified, so you won't necessarily be putting the escape sequences back in the correct places.
HugoIn reply to Re: Re: Wrap while ignoring certain sequences
by hv
in thread Wrap while ignoring certain sequences
by Coruscate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |