Quote:
Originally Posted by
mrm5102
...
So that part of the REGEX that has $(echo -e "\033"), does this change the Escape Sequence to whatever that local machine uses..?
No, it doesn't change to anything, the character with ASCII oct 033 is escape (ESC), the same on all OS. How this character is shown can differ though. As an example it's shown as
^[ in "vi". And that is one character, as you will notice if you move the cursor in "vi" through e.g.
^[[0m - 4 characters.
I don't understand how you can do this with the regex
\^\[\[[0-9]m, the only explanation I have is that someone have done a copy-paste when it have been shown as e.g.
^[[1m on the screen. But in that case it's no longer a VT100 escape sequence, and I don't think it will do any underline or bold if you don't replace them. I mean the one character ESC is sometimes shown as
^[, but if you type the two characters
^[ it doesn't mean ESC.