Hi,

Yes, this helps. I did go down a similar route with saxon before I found the exclamation mark flag. The issue I had was that using the Java bindings in Saxon was very inefficient when calculating matches for large number of attributes. This may have been my fault for not compiling the regex outside of the "for" statement, but I remember being relieved to find the magic flag to switch to Java regular expressions. I'll try out the github reference and see how I get on.

Is this switch something I could request as an enhancement, if so could I expect it to be implemented any time soon?

Thanks for you help,
Gary


From: Michael Seiferle <ms@basex.org>
To: The Trainspotter <wys01@btinternet.com>
Cc: "basex-talk@mailman.uni-konstanz.de" <basex-talk@mailman.uni-konstanz.de>
Sent: Monday, 15 October 2012, 8:58
Subject: Re: [basex-talk] Using full Java regular expressions

Hi Gary, 

not directly a flag, but you are for sure able to use Java classes from within BaseX like so https://gist.github.com/c72fad2758af668eb0f1

More information on our Java Bindings can be found here: http://docs.basex.org/wiki/Java_Bindings

I hope this helps, feel free to ask for more help =)

Michael
Am 13.10.2012 um 16:10 schrieb The Trainspotter <wys01@btinternet.com>:

Hi,

I'm currently converting my project to use BaseX instead of Saxon. One thing you can do in Saxon is provide a flag (an exclamation mark) to your regular expression to tell the matches function to use the Java regular expression processor, rather than the rather cut down expressions available in the XQuery spec.

Is there anything similar in BaseX? 

If not what do you recommend to define a Java regular expression based function for XQuery?

Thanks in advance,
Gary
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk