]> Cypherpunks.ru repositories - gostls13.git/commit
regexp/syntax: accept (?<name>...) syntax as valid capture
authorMauri de Souza Meneguzzo <mauri870@gmail.com>
Sat, 29 Jul 2023 20:26:00 +0000 (20:26 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 31 Jul 2023 19:52:57 +0000 (19:52 +0000)
commitee61186b3301bb1c8610c0925fffd89e061909bb
tree81eb81f16c4f7b9a3e25c1eba3db67e965e555ce
parent977e23a70766f8d0801e43bbfb68136bf54a84b7
regexp/syntax: accept (?<name>...) syntax as valid capture

Currently the only named capture supported by regexp is (?P<name>a).

The syntax (?<name>a) is also widely used and there is currently an effort from
 the Rust regex and RE2 teams to also accept this syntax.

Fixes #58458

Change-Id: If22d44d3a5c4e8133ec68238ab130c151ca7c5c5
GitHub-Last-Rev: 31b50e6ab40cfb0f36df6f570525657d4680017f
GitHub-Pull-Request: golang/go#61624
Reviewed-on: https://go-review.googlesource.com/c/go/+/513838
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/regexp/syntax/doc.go
src/regexp/syntax/parse.go
src/regexp/syntax/parse_test.go