REPLACE

Returns the string after replacing a part with a different text string.

Usage examples 

  • REPLACE("world world", 1, 5, "hello")

  • REPLACE(tableA.fieldB, 1, 5, "hello")

Syntax 

REPLACE ( text, position, length, newText )

  • text - any string expression.

  • position - any numeric expression representing where the replacement will begin (starting from 1).

  • length - any numeric expression representing the number of characters in the text to be replaced.

  • newText - any string expression representing the text which will be inserted into the original text.

Returns 

string - the string after replacing matching parts.

Functions reference