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