This function replaces all substrings matching the given regular expression with a given replacement.
Syntax
replaceAll(text, regex, replacement) #Output: Text
If you want to replace only the first matching occurrence, have a look at the replaceFirst() function.
Parser expression | Value |
---|---|
%{replaceFirst("Hello World", "l", "_")} | He_lo World |
%{replaceAll("Hello World", "l", "_")} | 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
Use case |
---|
No content found. |