[Bug 29253] [XQ3TS] fn-matches-50

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

--- Comment #5 from Tim Mills <tim@cbcl.co.uk> ---
(In reply to Michael Kay from comment #3)
> Surely (.?) can be bound to an empty string, but (.)? can't? I would have
> thought a group should never be bound to a string that doesn't match the
> regex fragment inside the parentheses.

The specification says

"If no string is matched by the Nth capturing subexpression, the back-reference
is interpreted as matching a zero-length string."

So (.?) would match an empty string, and bind the \1 to the empty string.

But (.)? can match the empty string, but no string is matched by thecapturing
subexpression, yet the back-reference \1 is still bound to the empty string.

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

Received on Wednesday, 4 November 2015 11:25:44 UTC