findReplaceAll()

This function replaces all occurrences of a given text with a given replacement.

Bash
findReplaceAll(text, textToBeReplaced, replacement) #Output: Text

Examples

Parser expression

Description

Bash
%{findReplaceAll("Goodbye my love, hello my friend.", "my", "your")}

This example returns:

Goodbye your love, hello your friend.

Bash
%{findReplaceAll("Jira Workflow Toolbox is a great tool!", "Jira Workflow Toolbox", "JWT")}

This example returns:

JWT is a great tool!

Bash
%{findReplaceAll("The weather is beautiful!", "e", "a")}

This example returns:

Tha waathar is baautiful!

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

text

text

Any given text.

textToBeReplaced

text

The string that should be replaced.

replacement

text

The replacement for all found substrings matching the textToBeReplaced.

Output

This function returns a text

If you want to use a regular expression to find the substrings that should be replaced, have a look at replaceAll().

If you want of only replace the first occurence of a substring, have a look at findReplaceFirst().


(books) Use cases and examples