MarkLogic 9 Product Documentation
sql:like

sql:like(
   $input as xs:string?,
   $pattern as xs:string,
   $escape as xs:string
) as xs:boolean?

Summary

Returns true if the specified $input like the specified $pattern, otherwise returns false.

Parameters
input The input from which to match.
pattern The expression to match. '_' matches one character and '%' matches any number of characters.
escape If a '_' ann '%' are preceeded by an escape character then it will be match as the char '-'/'%' themselves.

Example

sql:like("this string", "id%")

=> false

sql:like("this", "t%i_")

=> true
Powered by MarkLogic Server | Terms of Use | Privacy Policy