0
votes

I'm trying to create a new custom filed that matches the video length in a campaign name. The software I'm using is Google Data Studio.

For instance the campaign name I'm trying to match is the following:

367358_Reputation|CorporateReputation|Video|Awareness|DAN|NEST|MLT|CORP|IT|NP|ACQ|InStreamVideo|V1|it|LCL|DNP|NA|30s|16:9|mp4|Video|Ambiente|

I want to match "30s" and the code I'm writing in Data Studio is the following:

CASE
  WHEN REGEXP_MATCH(Campaign, "(.*30s.*)") THEN "Video length 30"
  ELSE NULL
END
1

1 Answers

0
votes

The REGEXP_MATCH function evaluates a field or expression using Google RE2 regular expression. Use the expression below

CASE WHEN REGEXP_MATCH(Campaign, ".*30s.*") THEN "Video length 30" END

PS: You also have a typo in your word REGEXP_MTACH should be REGEXP_MATCH