[MarkLogic Dev General] fn:replace Query
anthony.coates at db.com
Thu Mar 12 03:27:07 PDT 2015
“+” is a special character for regular expressions. The 2nd parameter to fn:replace is treated as a pattern, not just a plain string.
Try “\+” instead.
From: general-bounces at developer.marklogic.com [mailto:general-bounces at developer.marklogic.com] On Behalf Of Kapoor, Pragya
Sent: 11 March 2015 09:26
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] fn:replace Query
I am running the below query
This query is giving the following error:
[1.0-ml] XDMP-REGEX: (err:FORX0002) fn:replace("test-2015-03-11T14:46:58.44+05:30", "+", "@") -- Invalid regular expression
Please let me know, why ML is behaving this way.
"This e-mail and any attachments transmitted with it are for the sole use of the intended recipient(s) and may contain confidential , proprietary or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this e-mail or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful."
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures and to http://www.db.com/unitedkingdom/content/privacy.htm for information about privacy.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the General