Hello,
I am trying to figure out a way to extract a part of text from the below url
mysites.com?utm_campaign=mycampaign_20160525_en&utm_medium=email&utm_source=google&utm_content=cart
How can i just take "utm_medium=email" from this url using Alteryx formula?
please let me know
thanks
Solved! Go to Solution.
I would suggest using a couple of REGEX tool.
First tokenise with expression
[?&]([^=]*=?[^&]+)
Then parse with a similar expression
([^=]+)=?(.*)
This will break it into field and value.
If all you want is that explicit key and value then you can use a Formula tool:
REGEX_Replace([URL], ".*[?&](utm_medium=[^&]+).*", "$1")
Attached example does both.