Closed
Description
Would it be possible to support in addition to the existing syntax (?P<name>exp)
for named capture groups also the syntax (?<name>exp)
?
My use case for this is that I am currently writing a jq clone called jaq. Recently, I have added support for regular expressions to jaq using the regex
crate, which works very well. However, because jq supports only the (?<name>exp)
syntax (because of the oniguruma
library) and jaq only the (?P<name>exp)
syntax (because of the regex
crate), it is currently impossible to write regexes with named capture groups that are valid in both jaq and jq.
Apart from this, the (?<name>exp)
syntax seems reasonably popular, so apart from my special use case, it might make sense to add support for this syntax. :)