-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathCode.regex.txt
More file actions
7 lines (6 loc) · 633 Bytes
/
Code.regex.txt
File metadata and controls
7 lines (6 loc) · 633 Bytes
1
2
3
4
5
6
# Matches an ANSI escape code
(?-i)\e # An Escape
\[ # Followed by a bracket
(?<ParameterBytes>[\d\:\;\<\=\>\?]{0,}) # Followed by zero or more parameter bytes
(?<IntermediateBytes>[\s\!\"\#\$\%\&\'\(\)\*\+\,\-\.\/]{0,}) # Followed by zero or more intermediate bytes
(?<FinalByte>[\@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_\`abcdefghijklmnopqrstuvwxyz\{\|\}\~]) # Followed by a final byte