This function returns true, if the given text matches a regular expression, otherwise it returns false.
true
false
matches(text, regex) #Output: Boolean
%{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:
Parameters used in this function
text
regex
This function returns a
Checks, if the given text matches the given regular expression.