Replace text values in one or multiple columns
(\d+)
to extract all the numbers from a column. Check out the examples at the end of the page for additional examples.
Regex (short for Regular Expressions) utilies a special language to extract certain elements of a text/string column.
Regex Cheatsheet
Select Column
Input Column Name
Input Regex
Extracting numbers from currency columns
(\d+(?:\.\d+)?)
. To translate:\d+
is looing for one or more digits?:
is a non-capturing group which in short means that we don’t want these mathes to be stored separately (in our example the decimals are part of the number, hence why we don’t want them stored separately)\.
is looking for a .
(dot)\d+
is looing for one or more digitsExtracting domains from emails
@(\w+).
. To translate, before what we want to extract there’s a @
and our extract group finishes before the .
(dot)Standardize product rating
(\d+)\s*
\s*(?:/|out of)\s*(\d+)