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

F&O: tokenize/replace clarifications

From: Jennifer Schachter <jas@decisionsoft.com>
Date: Tue, 19 Nov 2002 11:40:28 -0500 (EST)
To: <public-qt-comments@w3.org>
Message-ID: <Pine.LNX.4.33.0211191628190.3898-100000@truckee.dsl.local>




Hi, 

I am currently implementing some of the regex functionality and wanted to 
clarify the following:

Replace
=======

- replace("foobar", "foo", "$1bar") -> The $1 is not defined in the 
  pattern so should an exception be thrown?

- The spec says: "A literal $ symbol must be written as \$." 
  If there is a literal that is not escaped, and it is followed by 
  something which is not a number, should an exception be thrown?

Tokenize 
======== 
- tokenize("foobar", "") -> If you call tokenize with a
  pattern matching the zero-length string, what should the result be? 
  I would think that an exception should be thrown (like in Replace)

Also, the layout of the poem in the matches function test-cases [section
6.4.16.3] has not been corrected in the new release of the spec (as
discussed in the email thread "Regular Expressions in XQuery/XPath2" on
October 21.)

Thank you in advance, 

Cheers, 
Jennifer


-- 
Jennifer "Georgina" Schachter, Software Engineer  
DecisionSoft Ltd.            http://www.decisionsoft.com
Office: +44 (0) 1865 203192
Received on Tuesday, 19 November 2002 12:42:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:13:58 GMT