Versions Compared

Key

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


Page properties
hiddentrue
Status
Tech review

Status
titletodo

Style guide

Status
titletodo

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

Page properties
hiddentrue
Short descriptionReturns a text copy of s where each substring matching the given regular expressionregexp has been replaced with the given replacement string.Output StatussubtletruetitletextAvailable since UI Text Box
sizemedium
typeinfo

This function returns a text copy of s where each substring replaces all substrings matching the given regular expression regexp has been replaced with the a given replacementstring.


Code Block
languagebash
titleSyntax
linenumberstrue
replaceAll(string stext, string regexpregex, string replacement) #Output: Text


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
replaceAll(" Hello World ", "\\s", "")


This example returns a text : "HelloWorld":

HelloWorld

UI Text Box
typeinfo

All whitespace characters have been removed. 

\s is the regular expression equivalent for a whitespace.



Code Block
languagebash
linenumberstrue
replaceAll(" He__o Wor_d ", "_", "l")


This example returns:

Hello World



UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
xxxtext

Status
subtletrue
titledata typetext

Any given textParameter description.
xxxregex

Status
subtletrue
titledata type

Parameter description.

text

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

Status
subtletrue
titledata typetext

This text will replace all substrings found by the regexParameter description.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext

UI Text Box
typetip

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



UI Text Box
typetip

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.



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_replaceall" and space = currentSpace()


Page properties
hiddentrue
id1


Parser function cloudreplaceAll()
Map(tick)
Notes




Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

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



Page properties
hiddentrue


Short description

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

Output

Status
subtletrue
titletext

Available since

Status
subtletrue
colourBlue
titleneeds lookup

Label

Status
colourRed
titlestaff pick