MarkLogic 9 Product Documentation
sql.likesql.like(
input as String?,
pattern as String,
escape as String
) as 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 is a string", "is");
=> true
sql.like("this is a string", "zoo");
=> false
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.