Skip to main content
REGEX_REPLACE

Replaces text that matches a regular expression pattern with a specified replacement

Updated over a week ago

Description

The REGEX_REPLACE() function is used to replace text within a given text string that matches a regular expression pattern with a specified replacement text. This is a powerful tool for text manipulation and data cleaning.

Syntax

REGEX_REPLACE(text, “pattern”, replacement)

Output

text

Variables

  1. text: The input text string in which you want to perform replacements.

  2. pattern: The regular expression pattern used to identify the text to be replaced.

  3. replacement: The text that you want to replace the matched text with.

Example

REGEX_REPLACE(`Original Text`, "[^a-zA-Z0-9 ]+", "")

ID

Original Text

REGEX_REPLACE

1

Hello, World!

Hello World

2

Example123: 456789

Example123 456789

3

Remove! Symbols? From Text!

Remove Symbols From Text

Did this answer your question?