BaseX 13.0 reports [FORX0001] Invalid regular flag: 'j'.
Hi,
Has anything changed w.r.t. regex processing in BaseX 13.0?
XQuery code making use of the "j" regular expression flag is now reported with "[FORX0001] Invalid regular flag: 'j'." This worked in BaseX 12.4.
I found an old thread reporting the same issue https://www.mail-archive.com/basex-talk at mailman.uni-konstanz.de/msg11579.html. Back then, issue https://github.com/BaseXdb/basex/issues/1669 was fixed, but I'm not sure if this time it's an intentional change?
Best,
Ron
Apologies, just found https://docs.basex.org/main/Upgrading_to_BaseX_13#language:
Quoted text · ron.vdbranden · 3 lines
> > the regular expression flags |j|, |!| and |;| were removed. >
...so answering my own question: yes, that change was intentional!
Going to check whether I can get the negative lookahead pattern for which I was resorting to Java regex matching working...
https://qt4cg.org/specifications/xpath-functions-40/Overview.html#regex-negative-lookahead-assertion
Best,
Ron
Quoted text · ron.vdbranden at gmail.com · 18 lines
On 10/11/2026 17:49, ron.vdbranden at gmail.com wrote: > Hi, > > Has anything changed w.r.t. regex processing in BaseX 13.0? > > XQuery code making use of the "j" regular expression flag is now > reported with "[FORX0001] Invalid regular flag: 'j'." This worked in > BaseX 12.4. > > I found an old thread reporting the same issue > https://www.mail-archive.com/basex-talk at mailman.uni-konstanz.de/msg11579.html. > Back then, issue https://github.com/BaseXdb/basex/issues/1669 was > fixed, but I'm not sure if this time it's an intentional change? > > Best, > > Ron >
Written for BaseX 13.0, the current version.