2 ## uncolor ? remove terminal escape sequences such as color changes
3 ## Source: https://unix.stackexchange.com/questions/14684/removing-control-chars-including-console-codes-colours-from-script-output by Gilles
6 \e\
[ [ -?
]* [@
-~] | # CSI ... Cmd
7 \e\
] .*?
(?
:\e
\\|[\a\x9c]) | # OSC ... (ST|BEL)
8 \e
[P
^_
] .*?
(?
:\e
\\|\x9c) | # (DCS|PM|APC) ... ST