I’m not sure what the answer is to question 2, but for question 1, the answer is that MarkLogic’s implementation of XPath doesn’t support the \b character escape because it is not included in the XPath specification for regular expressions, which itself is based on "XML Schema Part 2: Datatypes Second Edition”. The only single-character escapes are these:
https://www.w3.org/TR/xmlschema-2/#nt-charClassEsc Some XSLT and XQuery processors support extended regular expressions as a proprietary feature (for example, Saxon has a semi-documented extension that allows full Java regex), but MarkLogic doesn’t (unless there is undocumented support that I don’t know about). David On Mar 22, 2017, at 3:55 PM, Oleksii Segeda <oseg...@worldbankgroup.org<mailto:oseg...@worldbankgroup.org>> wrote: Hi everyone, Quick questions regarding regex in ML: 1. What’s ML alternative to word boundaries \b? Seems that fn:analyze-string doesn’t support this special character. 2. Does JS version of this function (fn.analyzeString) use JS regex engine? If so, why it gives me error for fn.analyzeString("foo bar bar", "\\b<smb://b>(bar)\\b") ? Regards, Oleksii Segeda IT Analyst Information and Technology Solutions <image002.png> <image003.png> _______________________________________________ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general