W3C home > Mailing lists > Public > public-qt-comments@w3.org > December 2002

RE: F&O comments on 6.4

From: Jennifer Schachter <jas@decisionsoft.com>
Date: Wed, 11 Dec 2002 12:09:03 +0000 (GMT)
To: "Kay, Michael" <Michael.Kay@softwareag.com>
Cc: <xquery@attbi.com>, <public-qt-comments@w3.org>
Message-ID: <Pine.LNX.4.33.0212111120430.20602-100000@truckee.dsl.local>


> > - Is an error raised only if the entire pattern matches the 
> > zero-length string?  What about captured substrings, like 
> > replace("xxx", "()x*",
> > "$1") or replace("xxx", (^).*($)", "$1$2")?  Are these 
> > allowed (resulting in the empty string?) or are they errors?
> I can't see any strong reason why a zero-length captured substring shouldn't
> be allowed, but perhaps I'm missing something.

While zero-length captured substrings might be permissible, I beleive
these examples would result in errors being thrown because both "()x*" and
"(^).*($)" match the zero-length string.

Accordingly, valid examples for this would be replace("xxx", "()x+", "$1")
and replace("xxx", "(^).*($)", "$1$2"), both of which do not have patterns
matching the zero length string. Like the original examples, these should 
result in the empty string.


Jennifer "Georgina" Schachter, Software Engineer   +44-1865-203192
DecisionSoft Limited                               http://www.decisionsoft.com
XML Development and Services
Received on Wednesday, 11 December 2002 07:17:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:44 UTC