These docs are for v1.0. Click to read the latest docs for v1.2.

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"