CASE with REGEXP
Hi, I'm having problem in creating a field, that cleans my Landing Page URLs a bit (Data Source is GA)
CASE WHEN REGEXP_MATCH(Landing Page, '^.*\\?.*$') THEN REGEXP_EXTRACT(Landing Page, '^(.+)\\?') ELSE Landing Page END
What this does - is leaves the URL as it is, if it's not got a ?variable=xxxxxx type ending to it, and if it does have valuetrack variables - cleans everything starting with "?" questionmarks. Each REGEXP works well when tested separately, but adding the full CASE formula - it's just "Invalid Formula"
Am I missing an elephant in a room or smth?