Go forward to Back-reference Operator.
Go backward to List Operators.
Go up to Common Operators.
Grouping Operators (`(' ... `)' or `\(' ... `\)')
=================================================
A "group", also known as a "subexpression", consists of an
"open-group operator", any number of other operators, and a
"close-group operator". Regex treats this sequence as a unit, just as
mathematics and programming languages treat a parenthesized expression
as a unit.
Therefore, using "groups", you can:
* delimit the argument(s) to an alternation operator (
see Alternation Operator.) or a repetition operator (
see Repetition Operators.).
* keep track of the indices of the substring that matched a given
group. See Using Registers, for a precise explanation. This
lets you:
* use the back-reference operator (*note Back-reference
Operator::.).
* use registers (see Using Registers.).
If the syntax bit `RE_NO_BK_PARENS' is set, then `(' represents the
open-group operator and `)' represents the close-group operator;
otherwise, `\(' and `\)' do.
If the syntax bit `RE_UNMATCHED_RIGHT_PAREN_ORD' is set and a
close-group operator has no matching open-group operator, then Regex
considers it to match `)'.