File: regex.txt

package info (click to toggle)
golang-github-lunixbochs-vtclean 0.0~git20170504.d14193d-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 84 kB
  • sloc: makefile: 3
file content (14 lines) | stat: -rw-r--r-- 420 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
this is the source definitions for the scary escape code regex

# from tests in Terminal.app, this regex should cover all basic \e[ and \e] cases
^([\[\]]([\d\?]+)?(;[\d\?]+)*)?.

# this catches any case the above does not
# make sure to not include any special characters the main regex finds (like ?)
\[[^a-zA-Z0-9@\?]+.

# esc + paren + any single char
[\(\)].

# didn't re-check this one (not included)
[\[K]\d+;\d+