[XML4Lib] xquery regex

Michael J. Giarlo mgiarlo at Princeton.EDU
Thu Oct 4 16:50:28 EDT 2007


Hey Nicole,

This seems to work for me:

declare function local:test-tokenize() {
     let $str := "blah%3Afoo%3Abar"
     return tokenize($str, "%3A")
};

<debug>
     {
         for $token in local:test-tokenize()
         return <token>{ $token }</token>
     }
</debug>

-Mike


Nicole Engard wrote:
> I stink at regular expressions.  Can anyone tell me how to use
> fn:tokenize (http://www.xqueryfunctions.com/xq/fn_tokenize.html) to
> split a string on "%3A" (without the quotes)
> 
> Thanks in advance!
> Nicole


More information about the XML4Lib mailing list