Alteryx Designer Desktop Discussions

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

RegEx Extracting part of URL

reignM
7 - Meteor

Hi! I have this example of a data which consist of links.

Screenshot 2022-04-11 150943.jpg

 

Using RegEx, i wish to get the company name - Abc, Def and Ghi here for those of only https://files-example.com files .

 

For example, in this case, bolded is the company name.

https://files-example.com/Marie/Abc/03%This%is%40title%20A.mpv

 

How do i write a regular expression that checks those of https://files-example.com and retrive that of just the company name in another column?

 

I am fairly new to RegEx and would absolutely appreciate your help.

7 REPLIES 7
atcodedog05
22 - Nova
22 - Nova

Hi @reignM 

 

Here is how you can do it.

Workflow:

atcodedog05_1-1649661506943.png

 

You can learn more about Regex from the below link

https://community.alteryx.com/t5/Interactive-Lessons/Parsing-Data-with-RegEx/ta-p/441415

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689

 

Hope this helps : )

Akash__on
8 - Asteroid

.*Marie/(.*)/.*

 

you simply have to parse out the desired content after Marie. in () and leave the rest.

 

Regards, 

Aakash

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @reignM 

 

You can learn more about Regex from the below link

https://community.alteryx.com/t5/Interactive-Lessons/Parsing-Data-with-RegEx/ta-p/441415

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689

 

In addition to the above resources, you can use https://regex101.com/ as a sandbox for building and testing out regex. The tool is very intuitive for step-by-step regex building.

atcodedog05_0-1649662148335.png

 

This should help you get started with the amazing journey of Regex 😊

 

Hope this helps : )

reignM
7 - Meteor

This works wonderfully! Thank you so much for the help as well as the attached Regex resources!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @reignM 

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 :) 

atcodedog05
22 - Nova
22 - Nova

@reignM 

 

Happy to hear that you learnt something new today which will help you in the future 😀

Labels