From: Dmitriy S. <sha...@gm...> - 2010-10-06 17:25:56
|
On Tue, 2010-10-05 at 23:05 +0200, Stefan Majewski wrote: > Quite a while ago I wrote the message below. At that time I noticed > that XQuery does not allow for look-aheads and look-behinds in > regexes. Nonetheless, exist at that time used java regex syntax which > allowed that. Obviously that has changed, as I get this error when > migrating some patterns from 1.4 to current trunk. > > a call to matches() with an offending regex yields the following > message: > Conversion from XPath2 to Java regular expression syntax failed: Error at character 2 in regular expression (\b)(test)(\b): invalid escape sequenc > > This is just a stupid example, I know, but at some points > lookahead/behind can be very handy. I am just wondering if there is > any chance to get java regex behaviour back? I fear it is for some > reason not possible, like standards conformance, indexes?. I guess I > could find some kind of work-around. > > Anybody else stumbling over things like this? I did update it to saxon's new one (old was taken from saxon too). Can you give me example, so I can try to fix, explain why not or recommend workaround. -- Cheers, Dmitriy Shabanov |