Feature: Named Capturing Groups
Home | Features | Improve this section
A Named Capturing Group is a subexpression that can be captured and returned by the matching algorithm. A Named Capturing Group is also an Atom and can be repeated using Quantifiers and referenced using Backreferences by name.
Syntax
NOTE: The following syntax is an example based on some of the supported engines. For specific engine support, see Engines.
(?<name>…)— Groups the subexpression as a single Atom associated with the provided name. The result is captured and returned by the matching algorithm.(?'name'…)— Groups the subexpression as a single Atom associated with the provided name. The result is captured and returned by the matching algorithm.
Engines
| Engine | Supported |
|---|---|
| Perl | ✔ |
| PCRE | ✔ |
| Boost.Regex | ✔ |
| .NET | ✔ |
| Oniguruma | ✔ |
| Hyperscan | ✔ |
| ICU | ✔ |
| Glib/GRegex | ✔ |
| ECMAScript | ✔ |