3 <!DOCTYPE MODE SYSTEM 'xmode.dtd'>
5 <!-- Regular Expression mode, by Kevin Hunter -->
7 <!-- Currently implemented artifacts:
9 [...] - user-defined character classes
10 \d - Numerical characters (eq. [0-9])
11 \D - Non-numerical characters (eq. [^0-9])
12 \w - Alphanumeric characters and underscore (eq. [A-Za-z0-9_])
13 \W - Opposite of \w (eq. [^A-Za-z0-9_])
14 \s - Whitespace characters (ex. space, tab, formfeed, newline)
15 \S - Non-whitespace characters
16 \b - Word-break character
17 . - Any character, generally not including a newline (\n)
20 ^ - Match at beginning of string
21 $ - Match at end of string
22 ? - optionally match previous item token
23 * - Match previous token 0 or more times.
24 + - Match previous token 1 or more times.
25 | - Logical OR, allowing the previous token or next token to match
26 {m} - Match previous token exactly m times.
27 {m,} - Match previous token at least m times
28 {m,n} - Match previous token between m and n times, inclusive.
31 [^...] - negate user-defined character classes
32 (...) - Backreference - effectively save the matched part for later use
33 (?:...) - Group - Don't save, just mark the section of the pattern as a group
34 (?=...) - zero-width positive lookahead assertion
35 (?!...) - zero-width negative lookahead assertion
36 (?<=...) - zero-width positive lookbehind assertion
37 (?<!...) - zero-width negative lookbehind assertion
41 <RULES IGNORE_CASE='FALSE' HIGHLIGHT_DIGITS='TRUE' SET='FORCED_NUMBER'>
42 <SEQ TYPE='OPERATOR'>,</SEQ>
45 <RULES IGNORE_CASE='FALSE' HIGHLIGHT_DIGITS='TRUE'>
46 <SEQ TYPE='NULL'>\\</SEQ>
47 <SEQ TYPE='NULL'>\(</SEQ>
48 <SEQ TYPE='NULL'>\)</SEQ>
49 <SEQ TYPE='NULL'>\[</SEQ>
50 <SEQ TYPE='NULL'>\]</SEQ>
51 <SEQ TYPE='NULL'>\{</SEQ>
52 <SEQ TYPE='NULL'>\}</SEQ>
53 <SEQ TYPE='NULL'>\^</SEQ>
54 <SEQ TYPE='NULL'>\$</SEQ>
55 <SEQ TYPE='NULL'>\?</SEQ>
56 <SEQ TYPE='NULL'>\+</SEQ>
57 <SEQ TYPE='NULL'>\*</SEQ>
58 <SEQ TYPE='NULL'>\.</SEQ>
59 <SEQ TYPE='NULL'>\|</SEQ>
61 <SEQ TYPE='OPERATOR'>^</SEQ>
62 <SEQ TYPE='OPERATOR'>$</SEQ>
63 <SEQ TYPE='OPERATOR'>?</SEQ>
64 <SEQ TYPE='OPERATOR'>*</SEQ>
65 <SEQ TYPE='OPERATOR'>+</SEQ>
66 <SEQ TYPE='OPERATOR'>|</SEQ>
68 <SEQ TYPE='KEYWORD1'>\b</SEQ>
70 <SEQ TYPE='DIGIT'>\d</SEQ>
71 <SEQ TYPE='LITERAL2'>\D</SEQ>
73 <SEQ TYPE='KEYWORD3'>\w</SEQ>
74 <SEQ TYPE='KEYWORD3'>.</SEQ>
75 <SEQ TYPE='LITERAL3'>\W</SEQ>
77 <SEQ TYPE='KEYWORD4'>\s</SEQ>
78 <SEQ TYPE='LITERAL4'>\S</SEQ>
80 <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
81 <BEGIN>[^</BEGIN> <!-- user-defined negative character class -->
85 <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
86 <BEGIN>(?=</BEGIN> <!-- zero-width positive lookahead assertion -->
89 <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
90 <BEGIN>(?!</BEGIN> <!-- zero-width negative lookahead assertion -->
93 <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
94 <BEGIN><![CDATA[(?<=]]></BEGIN> <!-- zero-width positive lookbehind assertion -->
97 <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
98 <BEGIN><![CDATA[(?<!]]></BEGIN> <!-- zero-width negative lookbehind assertion -->
101 <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
102 <BEGIN>(?:</BEGIN> <!-- unsaved group -->
106 <SPAN TYPE='OPERATOR' DELEGATE='FORCED_NUMBER'>
110 <SPAN TYPE='OPERATOR' DELEGATE='MAIN'>
111 <BEGIN>[</BEGIN> <!-- user-defined character class -->
114 <SPAN TYPE='FUNCTION' DELEGATE='MAIN'>
115 <BEGIN>(</BEGIN> <!-- saved group (backreference) -->