REGEX_REPLACE

Returns a new string created by replacing all matches in the specified string using the regex and a replacement string.

Syntax

=REGEX_REPLACE(regex, string, replacement)

Arguments

ArgumentTypeDescription
regexStringThe regex to use when looking for matches
stringStringThe string to look for matches in
replacementStringThe string to replace all found matches with

Examples

=REGEX_REPLACE("b.?", "abc", "ZZZ")"aZZZ"