Hi, there should be a better way, maybe colorstrip() from Term::ANSIColor ?
Or, perhaps this will help:
( note: barely tested and likely to be fragile)$ perl -Mstrict -wE 'my $str = q{[\033[96m]word[\033[0m]}; say $str; s +ay $str =~ s/ \[ \\? \d+ [a-zA-Z]? \]? //gxr' [\033[96m]word[\033[0m] word
In reply to Re: Can't remove ANSI markup
by 1nickt
in thread Can't remove ANSI markup
by glendeni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |