The string to match.
The ANSI escape codes.
matchAnsi("\u001b[31municorn\u001b[39m");
//=> ['\u001b[31m', '\u001b[39m']
matchAnsi("\u001b]8;;https://github.com\u0007Click\u001b]8;;\u0007");
//=> ['\u001b]8;;https://github.com\u0007', '\u001b]8;;\u0007']
matchAnsi("\u001b[38;2;255;0;0mHello \u001b[0mDarkness \u001B[00;38;5;244m\u001B[m\u001B[00;38;5;33mmy \u001B[0mold");
//=> ["\u001b[38;2;255;0;0m", "\u001b[0m", "\u001B[00;38;5;244m", "\u001B[m", "\u001B[00;38;5;33m", "\u001B[0m"]
Match ANSI escape codes in a string.