fn:replace('organize the annual get-together', '\<the\>', " ")will also throw an XDMP-REGEX error in MarkLogic 4.1. It will work in earlier versions of MarkLogic Server. The change is documented in the 4.1 release notes, Section 4.3: http://developer.marklogic.com/pubs/4.1/books/relnotes.pdf _____ From: [email protected] [mailto:[email protected]] On Behalf Of Dominic Mitchell Sent: Tuesday, September 01, 2009 3:58 PM To: General Mark Logic Developer Discussion Cc: [email protected] Subject: Re: [MarkLogic Dev General] Regular expression - \b Word boundary On 1 Sep 2009, at 15:40, Lech Rzedzicki wrote: Just use '\sthe\s' instead (\s stands for whitespace elments, in this case space, IIRC - I've never used \b, to be honest). But that won't match "the thing" because it's at the beginning of a string. You need \b - or it's equivalent. Looking at <http://www.w3.org/TR/xpath-functions/#regex-syntax> and <http://www.w3.org/TR/xmlschema-2/#regexs>, I can't actually see either of the usual choices (\b, or \< & \>). However, when I try it in CQ, they appear to work. I can't quite see where this is documented... fn:replace('organize the annual get-together', '\<the\>', " ") => organize annual get-together -Dom On Tue, Sep 1, 2009 at 2:59 PM, judie pearline <[email protected]<mailto:[email protected]>> wrote: Hi, In Marklogic when i tried to use regular expression \b (word boundary) in replace function, its throwing an exception saying that "Invalid regular expression". Code - fn:replace('organize the annual get-together','\bthe\b'," ") The main purpose is to replace the word "the" with an empty string. But the string "the" in the word together should not get replaced. Please help me on this. Thanks, Judie _____ Love Cricket? Check out live scores, photos, video highlights and more. Click here<http://in.rd.yahoo.com/tagline_cricket_2/*http:/cricket.yahoo.com>. _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://xqzone.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
