Versions Compared

Key

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


Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titletododone

Style guide

Status
colourGreen
titletododone

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



Page properties
hiddentrue


Short description

Replaces all sub-strings matching the specific substrings matching a given regular expression with the given replacement.

Output

Status
subtletrue
titletext

Available since

Status
subtletrue
colourBlue
title2.2.12




UI Text Box
sizemedium
typeinfo

This function replaces all sub-strings matching the given Replaces specific substrings matching a regular expression with the given replacement, where ^% represents the matching sub-string, and ^ represents the index of the current sub-string under all matched sub-string starting at 1a given replacement.

Use this function instead of replaceAll() or replaceFirst() if you want to have full control over the exact substrings you want to replace.


Code Block
languagebash
titleSyntax
linenumberstrue
findModify(text, regexpregex, replacement) #Output: Text


UI Expand
titleExamples


Info

^% represents each of the matching substrings, and ^ represents the order of appearance beginning with 1.


Parser expressionDescription


Code Block
languagebash
linenumberstrue
findModify("JWT is the best tool!", "JWT", "Jira Workflow Toolbox") 


This example

returns the following text: "

returns 

Jira Workflow Toolbox is the best tool!

"


Code Block
languagebash
linenumberstrue
findModify("The cure for boredom is curiosity", "[a-zA-Zaeiou]", modulus(^, 2) = 1 ? toUpperCase(^%) : ^%) 


This example returns

the following text: "ThE cUrE fOr BoReDoM iS cUrIoSiTy.".


Info

This example checks for vowels in the given text.

For each appearance it checks whether the position in the text.

If the position is an equal number the character will be converted to upper case using the toUpperCase() function.




Parameter description
UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
text

Status
subtletrue
titletext

Any given text.
regexp
regex

Status
subtletrue
titletext

A valid
regeular
regular expression that grabs all substrings to be replaced.
replacment
replacement

Status
subtletrue
title

data type

text

Any given text.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titleText