Searching text using wildcards options

Friday, 31 January 2014 · 2 messages
JB
John Best31 Jan 2014 15:09 #
Hi team, For the following query, using wildcards option, I am getting result as last 2 <a> nodes, but I am expecting the first 2 <a> nodes. !!
let $a := <A>
            <a>Famu.</a>
            <a>Famu.Don</a>
            <a>FamuDon</a>
            <a>FamuDon.</a>
            </A>

for $x in $a//a[text() contains text 'Famu..*' using wildcards]
  return $x
Whats wrong?
-- Have a nice day JBest
CG
Christian Grün31 Jan 2014 18:29 #
All your input strings will be tokenized:
  ft:tokenize("Famu.") → "famu"
  ft:tokenize("Famu.Don") → "famu don"
  ft:tokenize("FamuDon") → "famudon"
  ft:tokenize("FamuDon.") → "famudon"
​The resulting tokens will then be matches against your wildcard query. As a result, dots (.) are treated the same way as spaces. Hope this helps, Christian​
Quoted text · John Best · 32 lines
On Fri, Jan 31, 2014 at 3:09 PM, John Best <johnbest5673 at gmail.com> wrote: > Hi team, > > For the following query, using wildcards option, I am getting result as > last 2 <a> nodes, but I am expecting the first 2 <a> nodes. !! > > > let $a := <A> > <a>Famu.</a> > <a>Famu.Don</a> > <a>FamuDon</a> > <a>FamuDon.</a> > </A> > > for $x in $a//a[text() contains text 'Famu..*' using wildcards] > return $x > > > Whats wrong? > > -- > Have a nice day > JBest > > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > >

⚡Generated with XQuery