Alteryx Designer Desktop Discussions

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

Extracting Part of a URL

tf05
7 - Meteor

I am looking to only extract part of the URL. It will always be the two sections after the .co.uk/

 

For example

 

https://websiteaddress.co.uk/extract this/andthis/gclid=CjwKCAjw7--KBhAMEiwAxfpkWMKrv223JAuniVdiwizN0ME3cN4RbCQSY8dT-wqBW

 

From the above URL I want to extract 'extract this/andthis' the text will differ however it will always be the two sections straight after the .co.uk

 

I have played around with RegEx and REGEX_Replace but to no luck

 

Thankyou

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @tf05 

 

Here is how you can do it. I am assuming the last part always = (I,e Is a part which is passing parameter)

Workflow:

atcodedog05_0-1645109702281.png

 

Hope this helps : )

 

binuacs
20 - Arcturus

@tf05 

 

REGEX_Replace([URL], '(.*)\/.+', '$1')

 

binuacs_0-1645110066092.png

 

 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @tf05 

Cheers and have a nice day!

reignM
7 - Meteor

You too! Thank you for the https://regex101.com/ sandbox link. That would definitely help with my learning on RegEx tremendously. Have a wonderful day ahead :) 

Labels