Removes ANSI escape sequences from s (colours, bold, cursor moves, etc.).
s
String stripAnsi(String s) => s.replaceAll(RegExp(r'\x1B(?:[@-Z\\-_]|\[[0-9;]*[A-Za-z])'), '');