Quantcast
Channel: CodeProject Latest postings for Regular Expressions
Viewing all articles
Browse latest Browse all 224

Find the 4th last object in this campaign

$
0
0
My campaigns all follow the same naming convention, i am trying to use a Regex_Extract formula in DataStudio to create a new custom dimension that only displays the 4th last element in the below campaign: "ctatext"

Each element is separated by a _

channel_product_country_medium_brand_offer_campaignname_ctatext_date_objective_0


Closest i have gotten is:
REGEXP_EXTRACT(Session campaign, '(.+){4}(?:[^_]+.)')


but that only returns the 4th character in the string .. can anyone help ?

Viewing all articles
Browse latest Browse all 224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>