F&O: tokenize/replace clarifications

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 UTC