Altova MapForce 2024 Enterprise Edition

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.

mf-func-xpath2-matches

 

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:

 

i

Use case-insensitive mode. The default is case-sensitive.

m

Use multi-line mode, in which the input string is considered to have multiple lines, each separated by a newline character (x0a). The meta characters ^ and $ indicate the beginning and end of each line. The default is string mode, in which the string starts and ends with the meta characters ^ and $.

s

Use dot-all mode. The default is not-dot-all mode, in which the meta character . matches all characters except the newline character (x0a). In dot-all mode, the dot also matches the newline character.

x

Ignore whitespace. By default, whitespace characters are not ignored.

© 2018-2024 Altova GmbH