Omar Siam wrote:
Using the java regular expression implementation you can use greedy and some other things. The XSL and XQuery implementation according to the standards does not allow this and so misinterpretes the regular expression. See here:
I checked
and also the https://www.w3.org/TR/xmlschema-2/#regexs but did not find any mention of greediness. But then, I am not sure, whether I understood this from latter document:
A ·regular expression· R is a sequence of characters that denote a set of strings L(R). When used to constrain a ·lexical space·, a regular expression R asserts that only strings in L(R) are valid literals for values of that type.
For all ·atom·s S and non-negative integers n, m such that n <= m, valid ·piece·s R are: Denoting the set of strings L(R) containing: S? the empty string, and all strings in L(S).
Now I am not quite sure what L(S) means.
You can tell Saxon to use a different regexp engine such as the standard Java one: https://www.saxonica.com/html/documentation/functions/fn/matches.html
The hint is much appreciated, though BaseX is my actual development target. I just mentioned Saxon and eXist, because I cross checked them and found the result to be interesting enough to be taken to the list (and still hope, that Christian chimes in and may find a good reason, to do it the other way around in opposition to the way it is now)