
| Zed 0.180.2 | With this PR | | --- | --- | |  |  | ```js match = "424242" regex = /(42)+?\d{2}\1/g ``` - `/`: `operator` -> `string.regex` (like `"` for regex strings) - `+?`: `operator.regex` - `\d`: `string.escape` -> `string.escape.regex` - `\1`: `keyword.operator.regex` (backreference) - `/g`: `keyword.regex` -> `keyword.operator.regex` - `{2}`: `number` -> `number.quantifier.regex` Release Notes: - Improved Regex highlighting
55 lines
701 B
Scheme
55 lines
701 B
Scheme
[
|
|
"("
|
|
")"
|
|
"(?"
|
|
"(?:"
|
|
"(?<"
|
|
"(?P="
|
|
"<"
|
|
">"
|
|
"["
|
|
"]"
|
|
"{"
|
|
"}"
|
|
] @punctuation.bracket.regex
|
|
|
|
(group_name) @label.regex
|
|
|
|
[
|
|
(identity_escape)
|
|
(control_letter_escape)
|
|
(character_class_escape)
|
|
(control_escape)
|
|
] @string.escape.regex
|
|
|
|
[
|
|
"*"
|
|
"+"
|
|
"?"
|
|
"|"
|
|
"="
|
|
"!"
|
|
(start_assertion)
|
|
(end_assertion)
|
|
(any_character)
|
|
(lazy)
|
|
] @operator.regex
|
|
|
|
[
|
|
(boundary_assertion)
|
|
(non_boundary_assertion)
|
|
(backreference_escape)
|
|
(decimal_escape)
|
|
] @keyword.operator.regex
|
|
|
|
(count_quantifier
|
|
[
|
|
(decimal_digits) @number.quantifier.regex
|
|
"," @punctuation.delimiter.regex
|
|
])
|
|
|
|
(character_class
|
|
[
|
|
"^" @operator.regex
|
|
(class_range "-" @operator.regex)
|
|
])
|