You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

This function returns true, if the given text matches a regular expression, otherwise it returns false.

Syntax
matches(text, regex) #Output: Boolean
Examples
Parser expressionDescription
 matches("readme.txt", ".*\\.txt$")

This example returns a boolean value: true

matches("Jira Workflow Toolbox", "[JWT].+")
This example returns a boolean value: true
matches("Admin Toolbox", "[JWT].+")
This example returns a boolean value: false
matches(%{issue.attachment.details}, "(.*text/plain.*){1,}")

This example returns true if the current issue has at least one .txt file attached. This is a perfect example for a Logical validator.

The field used in this expression is: Attachments with details

Additional information

Parameters used in this function

ParameterInput (data type)Description
text

TEXT

Any given text.
regex

TEXT

A valid regular expression that the given text will be checked against.
Output

This function returns a BOOLEAN true or false.