Versions Compared

Key

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


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, regularExpression) #Output: Boolean


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
 matches("readme.txt", ".*\\.txt$")


This example returns a boolean value:

true


Code Block
languagebash
linenumberstrue
matches("Jira Workflow Toolbox", "[JWT].+")


This example returns a boolean value:

true


Code Block
languagebash
linenumberstrue
matches("Admin Toolbox", "[JWT].+")


This example returns a boolean value:

false


Code Block
languagebash
linenumberstrue
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



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
text

Status
subtletrue
titletext

Any given text.
regularExpression

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
 



Use cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_matches" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloudmatches()
Map(tick)
Notes




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 provided regular expression.

Output

Status
subtletrue
titleboolean

Available since

Status
subtletrue
colourRed
titleneeds look up

Label