Replaces specific substrings matching a regular expression with a 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.
findModify(text, regex, replacement) #Output: Text
Examples
^% represents each of the matching substrings, and ^ represents the order of appearance beginning with 1.
|
Parser expression |
Description |
|---|---|
|
Bash
|
This example returns Jira Workflow Toolbox is the best tool! |
|
Bash
|
This example returns ThE curE for bOredOm is cUriOsity. This example checks for vowels in the given text and writes them into a list. The output will be e, u, e, o, o, e, o, i, u, i, o, i For each appearance it checks whether the position is an odd number (modulus). If the position is an odd number the character will be converted to upper case using the toUpperCase() function. e - modulus(1,2) = 1 -> E will be upper case
... Long story short: Every second vowel will be converted to upper case! |
Additional information
Parameters used in this function
|
Parameter |
Input (data type) |
Description |
|---|---|---|
|
|
text |
Any given text. |
|
|
text |
A valid regular expression that grabs all substrings to be replaced. |
|
|
text |
Any given text. |
Output
This function returns a Text
(books) Use cases and examples
| Use case | Workflow function | Parser functions |
|---|---|---|
| Clone epic, tasks and sub-tasks |
toString() toStringList() issueKeysToIssueList() replaceFirst() first() fieldValue() textOnStringList() findModify() subtasks() issuesUnderEpic() |