You can use regex: let $input := "$10,000 value $6,000 , Not able to find other"
return fn:replace($input, "(\$[0-9]+),([0-9]+)", "$1$2") => $10000 value $6000 , Not able to find other Oleksii Segeda IT Analyst Information and Technology Solutions [http://siteresources.worldbank.org/NEWS/Images/spacer.png] [http://siteresources.worldbank.org/NEWS/Images/WBG_Information_and_Technology_Solutions.png] From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Thursday, August 3, 2017 9:33 AM To: [email protected] Subject: [MarkLogic Dev General] special character using fn:replace and regex Hi All, How to replace special character using fn:replace and value .I want to remove special character "," for both the $ values but other"," should exist . Example: Input : " $10,000 value $6,000 , Not able to find other" After using functx library I am able to get "$10" and "$6" now I want to replace these corresponding value to "$10,000" and "$6,000" respectively I am using fn:replace($input,"$10,",$10) but unable to replace "$10," with "$10" output : $10000 value $6000 , Not able to find other This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
