in reply to Can't remove ANSI markup

Hi, there should be a better way, maybe colorstrip() from Term::ANSIColor ?

Or, perhaps this will help:

$ 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
( note: barely tested and likely to be fragile)


The way forward always starts with a minimal test.