[Bug 29415] [FO31] Regex: capturing parentheses inside non-capturing parentheses

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29415

--- Comment #4 from Michael Kay <mike@saxonica.com> ---
Proposed resolution:

(0) Replace "subexpression" by "sub-expression" throughout. (The two spellings
are currently used interchangeably)

(a) In the paragraph that starts "Sub-expressions (groups) within the regular
expression are recognized." add at the end "A left parenthesis is recognized as
a capturing left parenthesis provided it is not followed by "?:" (see below),
is not within a character group (square brackets), and is not escaped with a
backslash. The sub-expression enclosed by a capturing left parenthesis and its
matching right parenthesis is referred to as a capturing sub-expression.

(b) Change the sentence

The presence of the optional ?: has no effect on the set of strings that match
the regular expression, but causes the left parenthesis not to be counted by
operations that number the groups within a regular expression, for example the
fn:replace function.

to

The presence of the optional ?: has no effect on the set of strings that match
the regular expression, but causes the left parenthesis not to be treated as a
capturing left parenthesis, which means it is not counted by constructs that
number the groups within a regular expression, such as back-references and the
fn:replace function.

(c) In the paragraph starting "Back-references are allowed", replace the phrase
"unescaped opening parentheses" by "capturing left parentheses".

(d) In the paragraph starting "A back-reference matches", replace the phrase
"unescaped left parentheses" by "capturing left parenthesis".

(e) In the specification of fn:replace and fn:analyze-string, replace
"parenthesized sub-expression" (several times) by "capturing sub-expression".

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 8 March 2016 20:49:21 UTC