This function replaces all substrings matching the given regular expression with a given replacement.


replaceAll(text, regex, replacement) #Output: Text



Parser expressionDescription


replaceAll(" Hello World ", "\\s", "")


This example returns:

HelloWorld

All whitespace characters have been removed. 

\s is the regular expression equivalent for a whitespace.



replaceAll(" He__o Wor_d ", "_", "l")


This example returns:

Hello World



Parameters used in this function

ParameterInput (data type)Description
text

Any given text.
regex

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

This text will replace all substrings found by the regex.



This function returns a

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 Wor_d"

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



Use cases and examples



Parser function cloudreplaceAll()
Map(tick)
Notes






Status
Tech review

Style guide




Short description

Replaces all substrings matching a regular expression with a given replacement.

Output

Available since

Label