[Bug 4610] K2-ReplaceFunc-3

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4610





------- Comment #3 from mike@saxonica.com  2007-06-12 09:27 -------
I think I have always read the sentence "The closing right parenthesis of
this subexpression must occur before the back-reference" as meaning "For a
subexpression to match, the closing right parenthesis of this subexpression
must occur before the back-reference." So I would interpret this as a no-match
with the resulting value being the zero-length string. (The justification for
this interpretation is that static parsing of the regex was discussed at the
beginning of the paragraph, whereas this sentence appears in the middle of a
discussion of the matching semantics.) 

However, I'm open to it being an error in the regex. Writing "(abc)\3" can
never do anything useful so one might as well strangle it at birth as return
arbitrary results.

Andrew, I suggest you raise a bug against the spec on this.

Received on Tuesday, 12 June 2007 09:27:59 UTC