Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Page properties
hiddentrue
Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

Page properties
hiddentrue
Short description

Checks, if the given text matches the given regular expression.

Output Statussubtletruetitleboolean UI Text Box
sizemedium
typeinfo

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

Code Block
languagebash
titleSyntax
linenumberstrue
matches(text, regex) #Output: Boolean
UI Expand
titleExamples
Parser expressionDescription
Code Block
languagebash
linenumberstrue
%{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


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

Using the conditional operator, this example returns:

true

UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
text

Status
subtletrue
titletext

Any given text.
regex

Status
subtletrue
titletext

A valid regular expression that the given text will be checked against.
UI Expand
titleOutput

This function returns a

Status
subtletrue
titleboolean

Page properties
hiddentrue
Short description

Checks, if the given text matches the given regular expression.

Output

Status
subtletrue
titleboolean