You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

This function replaces all sub-strings matching the given regular expression with a given replacement.

Syntax
replaceAll(text, regexp, replacement) #Output: Text
Examples
Parser expressionDescription
replaceAll(" Hello World ", "\\s", "")

This example returns "HelloWorld".

Additional information

Parameters used in this function

ParameterInput (data type)Description
text

TEXT

Any given text.
regexp

TEXT

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

TEXT

This text will replace all substrings found by the regexp.
Output

This function returns a TEXT

This expression could be used to e.g. modify an issue's summary or description.

If you want to replace only the first matching occurrence, have a look at the replaceFirst() function.

replaceFirst("Hello World", "l", "_")replaceAll("Hello World", "l", "_")
"He_lo World""He__o World"

If you don't want to use a regular expression, have a look at the findReplaceAll() function.