Loading TOC...

MarkLogic 12 EA 1 Product Documentation
fn:matches

fn:matches(
   $input as xs:string?,
   $pattern as xs:string,
   [$flags as xs:string]
) as xs:boolean?

Summary

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

Parameters
input The input from which to match.
pattern The regular expression to match.
flags The flag representing how to interpret the regular expression. One of "s", "m", "i", or "x", as defined in http://www.w3.org/TR/xpath-functions/#flags.

Example

fn:matches("this is a string", "is")

=> true

fn:matches("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.