Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Separate a URL from HTML

Jeremye
5 - Atom

Hi,

 

I need help figuring out how to separate a url from html.

 

For example: <div class="ExternalClass0103788B7A354193AF0A6D766A486E97"><p><span style="font-size&#58;8.5pt;font-family&#58;arial, sans-serif;"><a href="https//THIS IS THE URL.com"><span style="color&#58;#097cbb...

 

I think I would need a Regex expression but I don't really understand the syntax to do it. Any help would be much appreciated! 

4 REPLIES 4
FinnCharlton
13 - Pulsar

Hi @Jeremye , here is one way to do it with RegEx. In essence, you can copy and paste as much of the HTML around the URL as you want, and replace the URL with '(+?)'. This will search for this expression and return just the URL.

FinnCharlton_0-1677851969956.png

Hope this helps!

FinnCharlton
13 - Pulsar

Here's the syntax if you don't want the quote marks:

FinnCharlton_1-1677852103999.png

 

Christina_H
14 - Magnetar

You can do this without RegEx too, in a couple of formulas.

Christina_H_0-1677853042196.png

Substring([Input],FindString([Input],'<a href="')+9)

Left([Output],FindString([Output],'">'))

Jeremye
5 - Atom

Thank you!

Labels