MarkLogic Server 11.0 Product Documentation
sql:likesql: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 '_' or '%' 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
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.