[xquery-talk] ask about how to find string between another string

Mohamed kharrat med_khr at yahoo.fr
Tue Nov 30 21:52:34 PST 2010

Dear all,

i have this function:

 declare function local:Match($X as xs:string*,$Y as xs:string*)

 let $count:=tokenize($X, "\s") 
some $l in $count satisfies 
some $tok2 in tokenize($Y, "\s") satisfies
return true()

it's ok , it return true where $X exist in $Y
but the problem is: supposing i have:
$string1='an '
$string2= 'the xquery is a language for xml'

this function will return  true because 'an' exist in the word 'language'
but i want to know how to return true only if the word 'an' exit alone , not in 
other word of $string2

i hope you understand me.
thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20101130/b8861b56/attachment.htm

More information about the talk mailing list