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]> 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.
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general