in reply to Strip escape sequences
If you want to process the output and find failure or success, the escape codes won't hurt that. You can still match the string against /FAIL/ or /OK/.
And if you want to keep all wordchars and whitespace you could do something like:
but it depends on what you are trying to achieve.$str =~ s/[^\w\s]//;
|
|---|