Is there any way to perform a LIKE operation with XQuery in the same way as with SQL?
I wan't to construct some "startswith", "endswith" and "contains"-expressions.
Example of what I want to achieve:
for $x in /user where $x/firstname LIKE '%xxx' return $x
for $x in /user where $x/middlename LIKE 'xxx%' return $x
for $x in /user where $x/lastname LIKE '%xxx%' return $x
Is there any way to achieve this in XQuery?
EDIT:
Got the answer to the question above. New problem:
Would there be any way to do this the opposite way around? I would like to run those queries with the sql equivalent NOT LIKE operator. Is this possible? It has to be in an FLWOR-expression
EDIT2:
Solved the problem. You can run fn:not(starts-with('123', '1')) and it returns false.