[MarkLogic Dev General] fn:replace Query

Michael Blakeley mike at blakeley.com
Wed Mar 11 16:12:31 PDT 2015

You may want fn:translate instead of fn:replace. The docs for each function should make the difference clear.



-- Mike

> On 11 Mar 2015, at 02:25 , Kapoor, Pragya <PKapoor1 at innodata.com> wrote:
> Hi,
> I am running the below query
> fn:replace(fn:concat('test','-',fn:current-dateTime()),'+','@')
> 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.
> Thanks
> Pragya
> "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." _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general

More information about the General mailing list