David K. Bainbridge | 528b318 | 2017-01-23 08:51:59 -0800 | [diff] [blame] | 1 | this is the source definitions for the scary escape code regex |
2 | |||||
3 | # from tests in Terminal.app, this regex should cover all basic \e[ and \e] cases | ||||
4 | ^([\[\]]([\d\?]+)?(;[\d\?]+)*)?. | ||||
5 | |||||
6 | # this catches any case the above does not | ||||
7 | # make sure to not include any special characters the main regex finds (like ?) | ||||
8 | \[[^a-zA-Z0-9@\?]+. | ||||
9 | |||||
10 | # esc + paren + any single char | ||||
11 | [\(\)]. | ||||
12 | |||||
13 | # didn't re-check this one (not included) | ||||
14 | [\[K]\d+;\d+ |