1[
 2  "("
 3  ")"
 4  "(?"
 5  "(?:"
 6  "(?<"
 7  "(?P="
 8  "<"
 9  ">"
10  "["
11  "]"
12  "{"
13  "}"
14] @punctuation.bracket.regex
15
16(group_name) @label.regex
17
18[
19  (identity_escape)
20  (control_letter_escape)
21  (character_class_escape)
22  (control_escape)
23] @string.escape.regex
24
25[
26  "*"
27  "+"
28  "?"
29  "|"
30  "="
31  "!"
32  (start_assertion)
33  (end_assertion)
34  (any_character)
35  (lazy)
36] @operator.regex
37
38[
39  (boundary_assertion)
40  (non_boundary_assertion)
41  (backreference_escape)
42  (decimal_escape)
43] @keyword.operator.regex
44
45(count_quantifier
46  [
47    (decimal_digits) @number.quantifier.regex
48    "," @punctuation.delimiter.regex
49  ])
50
51(character_class
52  [
53    "^" @operator.regex
54    (class_range "-" @operator.regex)
55  ])