Skip to main content
Replaces all occurrences of characters in a string with another string. This function performs a case-sensitive match when searching for pattern. This function is supported from v3.0. Note: Prior to 3.0, this function was implemented as regexp_replace.

Syntax

Parameters

  • str: the original string.
  • pattern: the characters to replace. Note that this is not a regular expression.
  • repl: the string used to replace characters in pattern.

Return value

Returns a string with the specified characters replaced. If any argument is NULL, the result is NULL. If no matching characters are found, the original string is returned.

Examples

keywords

REPLACE, replace