matches
The matches function tests whether a supplied string (the first argument) matches a regular expression (the second argument). The syntax of regular expressions must be that defined for the pattern facet of XML Schema. The function returns true if the string matches the regular expression, false otherwise.
Languages
XQuery, XSLT 2.0, XSLT 3.0.
Parameters
Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
input | xs:string | The input string. | ||||||||
pattern | xs:string | The regular expression to match, see Regular Expressions. | ||||||||
flags | xs:string | Optional argument that influences the matching. This argument may supply any combination of the following flags: i, m, s, x. Multiple flags can be used, for example, imx. If no flag is used, the default values of all four flags are used. The four flags are as follows:
|