replace

Replaces one substring with another.

Syntax

replace(orig, pattern, replacement)

Argument

orig
The full strings.
pattern
A string (or regular expression).
replacement
A string.

Example

To replace a word in a phrase:

Templex Expression Results
{ replace("this and that", "this", "that") } "this and this"

Comments

The pattern can be any regular expression or plain string. If it is found in the original string, it will be replaced in the function’s output.