Expression Language
Also available as:
PDF

matches

Description: Returns true if the Subject exactly matches the Regular Expression provided by the argument.

Subject Type: String

Arguments:

  • Regex : The Regular Expression (in the Java Pattern syntax) to match against the Subject

Return Type: Boolean

Examples:

If the "filename" attribute has the value "a brand new filename.txt", then the following Expressions will provide the following results:

Table 1.12. Table 12. matches Examples

Expression

Value

${filename:matches('a.*txt')}

true

${filename:matches('brand')}

false

${filename:matches('.brand.')}

true