[MarkLogic Dev General] fn:replace Query

Justin Makeig Justin.Makeig at marklogic.com
Wed Mar 11 16:07:42 PDT 2015


You need to escape the +. That's a special character in regular expressions, meaning "at least one".

Justin


> On Mar 11, 2015, at 2:25 AM, 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150311/d3d6faac/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4477 bytes
Desc: not available
Url : http://developer.marklogic.com/pipermail/general/attachments/20150311/d3d6faac/attachment.bin 


More information about the General mailing list