Hi, > > - 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. Cheers, Jennifer -- Jennifer "Georgina" Schachter, Software Engineer +44-1865-203192 DecisionSoft Limited http://www.decisionsoft.com XML Development and ServicesReceived 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