XQuery matches Function
XQuery matches Function
The matches function returns true if the input matches with the provided regular expression; otherwise false.
Syntax
matches($input, $regex)
Input Parameters
$input
is the input string.$regex
is the regular expression.
Example
XQuery Expression
let $input := 'Tutorial Reference'
return (matches($input, 'Hello') = true(),
matches($input, 'T.* R.*') = true()
)
Output
false
true