Dear Mark,
I'm sorry to tell you that the boundary matcher \b is not officially supported by XQuery [1,2]; this is why it is not supported anymore by the latest version of BaseX. If you want to have this feature provided in XQuery 3.0 or a future version, you are invited to submit a small feature request in the W3 Issue Tracker [3].
All the best, Christian
[1] http://www.w3.org/TR/xpath-functions/#regex-syntax [2] http://www.w3.org/TR/xmlschema-2/#regexs [3] https://www.w3.org/Bugs/Public/
On Sat, Jan 7, 2012 at 9:37 PM, Mark Boon tesujisoftware@gmail.com wrote:
It's been a while since I did anything with BaseX. The last version I used was BaseX 6.5. Today I downloaded the latest version 7.0.2 and ran into a problem when trying to revive an old project. I get messages saying " [FORX0002] Invalid escape character: '\b'". Since the use of \b is rather essential to my project I had little choice but to investigate, so I retrieved the BaseX source code to see if I could determine the problem. I found the following in RegEx.java, line 88:
if("0123456789cCdDniIrsStwW|.-^$?*+{}()[]\".indexOf(c) == -1) REGESC.thrw(input, c);
I believe that's a mistake and should include 'b' and read:
if("0123456789bcCdDniIrsStwW|.-^$?*+{}()[]\".indexOf(c) == -1) REGESC.thrw(input, c);
When I make that modification my program works again as before. There may be more missing? I'm not especially a RegExp expert. And I'd like to make sure this modification didn't inadvertantly break something else that I just haven't noticed yet.
Mark Boon
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk