Skip to main content



Replace Function

The Replace function replaces all occurrences of a substring with another string.

Syntax

Replace(string, searchValue, replaceValue)

The Replace function replaces all occurrences of a substring with another string.

Arguments

string String - A string.

searchValue String - A substring to search for.

replaceValue String - The replacement value.

Remarks

Example:

Replace("abba", "b", "a"); // returns "aaaa"