In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Extract partial text from a url

moe
6 - Meteoroid

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

1 REPLY 1
jdunkerley79
ACE Emeritus
ACE Emeritus

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.

Labels
Top Solution Authors