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(%{issue.attachments}, ".*.txt$") ? "Text file found." : "No text file found."}

If the current issue has at least one .txt file attached, using the conditional operator, this example returns:

Text file found


%{matches("Jira Workflow Toolbox", "[JWT].+") ? "true" : "false"}

Using the conditional operator, this example returns:

true

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

Use cases and examples