Extract brand campaign names using REGEXEXTRACT()
After some discussions with the social media marketing team, the digital marketing director decided to simply remove the terms Brand
or Branded
from each of the campaign names.
This is where you come in. You know how to replace using regex but, this time, you will be using REGEXEXTRACT()
to pull all the characters not equal to Brand
. For example, after the extraction, DataCamp Brand
will become DataCamp
.
To perform this extraction, you will need to write a new regular expression. As an example, the regex (.*).Expressions
extracts any number of characters preceding the text and period, (i.e. Regular
would be extracted from Regular Expressions
).
Diese Übung ist Teil des Kurses
Marketing Analytics in Google Sheets
Anleitung zur Übung
- A regular expression in cell
I2
that will match any branded campaign (i.e. containingBrand
) is already written for you in cellI2
. - In cell
I3
, write another regular expression to extract the group of characters not equal toBrand
. Refer to the example above for a starting point! - Modify the current
IF()
statement in cellF2
by replacing the second argument,"REGEXEXTRACT"
, with aREGEXEXTRACT()
function.- The function should contain two arguments: the input text (in this case,
B2
), and the cell of your extract pattern.
- The function should contain two arguments: the input text (in this case,
- Apply the formula to the remainder of the cells,
F3:F29
. Make sure that your pattern (I3
) is an absolute reference!
Interaktive Übung
Setze die Theorie in einer unserer interaktiven Übungen in die Praxis um
