Replaces
all occurrences of one string with another within a specified string.
Syntax
Replace(
s1
,
s2
[,
s3
])
Parameters
Parameter
|
Description
|
s1
|
A source string.
|
s2
|
The string to replace.
|
s3
(Optional)
|
The replacement string.
If you do
not include a value for
s3
, or if
s3
is
null, the function uses an empty string.
|
Examples
The
following expressions are examples that use the
Replace
function:
Expression
|
Returns
|
Replace("Tony Blue", "Tony", "Chris")
|
Chris Blue
|
Replace("ABCDEFGH", "D")
|
ABCEFGH
|
Replace("ABCDEFGH", "d")
|
ABCDEFGH
|
Replace(Comments[0], "recieve", "receive")
|
Correctly updates the spelling of the word
receive
in
the first occurrence of
Comments
.
|
|
|
|