In a string field, replaces all occurrences of a string with a different string.
string - string expression to search
regex - string expression indicating a regular expression to search for
new_string - replacement string expression
REPLACE('President John Smith',’President’,’Ex-President’) returns 'ex-President John Smith'
regex is a regular expression to match the string. If you want to include special characters such as '[' in the string literal, it is necessary to escape them by prefixing them with double backslashes (e.g. '\\['). If you want to replace \ (backslash) use the following regex '[\\\\]', that will replace one \ (backslash).
Return value datatype
Impact of null value
If any (or all) inputs are null, returns null.