Hi all, Here's little current status (from the latest XercesJ svn codebase), about the XercesJ XPath 2.0 regex improvements we've done as part of jira issue XERCESJ-1732.
As per by the XPath 2.0 F&O spec, about regex flag as follows, <quote> x: If present, whitespace characters (#x9, #xA, #xD and #x20) in the regular expression are removed prior to matching with one exception: whitespace characters within character class expressions (charClassExpr) are not removed. </quote> 1) The current Xerces implementation, still doesn't follow "whitespace characters within character class expressions (charClassExpr) are not removed". I find it, hard to fix this. This also implies that, we follow java's regex behavior for this, and its good. 2) But java's handling of comments within regex, starting with character #, is not available within XercesJ XPath 2.0 regex implementation. That's the change we've done to java 1.8 regex codebase, and we got compliant to the XPath 2.0 F&O spec. I believe, now the XPath 2.0 function implementations for fn:matches, fn:replace and fn:tokenize (that all use the same regex engine) within Xerces, is very much in compliance to the spec. On Wed, Nov 24, 2021 at 5:40 PM Mukul Gandhi <muk...@apache.org> wrote: > Hi all, > This issue has been resolved with jira issue XERCESJ-1732. > -- Regards, Mukul Gandhi