replace (x, s, t)

The replace(x, s, t) function returns the content of the Text parameter x, where all occurrences of the Text parameter s are replaced by the content of the Text parameter t. If s is empty, nothing is replaced, and the result is equal to the original parameter x. The search and replace is done from left to right, and neither overlapping substrings nor already replaced text are considered for replacement.

The replace function is case-sensitive.

This function returns a value of type Text.

Examples

 replace ("The Quick Brown Fox Jumps Over The
Lazy Dog", "The", "a")

Result: "a Quick Brown Fox Jumps Over a Lazy Dog"

 replace ("The Quick Brown Fox Jumps Over The
Lazy Dog", "the", "that")

Result: "The Quick Brown Fox Jumps Over The Lazy Dog"

replace ("The Quick Brown Fox Jumps OOOver The
Lazy Dog", "OO", "oOOo")

Result: "The Quick Brown Fox Jumps oOOoOver The Lazy Dog"