Loading TOC...

sql.like

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