| www.delorie.com/gnu/docs/regex/regex_20.html | search |
![]() Buy the book! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
( ... ) 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:
| or \|)) or a repetition operator (see section 3.4 Repetition Operators).
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 `)'.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |