Closed nightroman closed 2 years ago
PCRE specs:
According to the specs, at least these two forms are supported:
(?<name>bar) \k<name> (?'name'bar) \k'name'
Currently, the scheme does not recognise named capture groups and treats named backreferences as syntax errors.
https://regex101.com/ shows that both forms are valid in PCRE2 (PHP >= 7.3.) and PCRE (PHP <7.3).
The commit adds these two forms support to the schema pcre.base.
pcre.base
The region SpecOperator is chosen to match regions of backreferences (\1, etc.).
SpecOperator
\1
Colorer results before and after the change (with visual.hrd and powershell scheme with inherited regex scheme):
visual.hrd
powershell
regex
form 1 <name>
<name>
form 2 'name'
'name'
PCRE specs:
According to the specs, at least these two forms are supported:
Currently, the scheme does not recognise named capture groups and treats named backreferences as syntax errors.
https://regex101.com/ shows that both forms are valid in PCRE2 (PHP >= 7.3.) and PCRE (PHP <7.3).
The commit adds these two forms support to the schema
pcre.base
.The region
SpecOperator
is chosen to match regions of backreferences (\1
, etc.).Colorer results before and after the change (with
visual.hrd
andpowershell
scheme with inheritedregex
scheme):form 1
<name>
form 2
'name'