Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Regex HTML parse

RMojsiak
8 - Asteroid

Hello everybody,

 

I would like to parse an HTML table, that is provided in the body of an email, which I extract with the Outlook 365 Beta Tool. I tried with the REGEX parse tool (and other tools), but I can't seem to find the right expression.

After looking at the extracted code I figured out that the headers are between <p class="MsoNormal"><b> and </b></p>
and the information is between <p class="MsoNormal"> and</p>.

Some of the expressions I tried: [<]p\sclass[=]["]MsoNormal["][>](.*?)[<]\/p[>]

"MsoNormal(.*?)[<]\/p[>] -> this pulls something through but not what I want

 

Maybe the answer is really easy, but I overlook it.

 

Happy Friday!

5 REPLIES 5
PhilipMannering
16 - Nebula
16 - Nebula

Hi @RMojsiak.

 

Are you able to share the html table in a Text Input or file, so that folks here can try and extract it the right text?

mceleavey
17 - Castor
17 - Castor

Hi @RMojsiak ,

 

As @PhilipMannering points out we can't really help fully unless we can see the HTML. However, I've put some basic regex structure together using the info you've provided.

The HTML looks like this:

mceleavey_0-1639745384179.png

And I've configured the regex as follows:

 

mceleavey_1-1639745418545.png

 

mceleavey_2-1639745443652.png

 

mceleavey_3-1639745469167.png

 

Then you just need to transpose/Crosstab and you're away.

 

M.

 

 



Bulien

RMojsiak
8 - Asteroid

I think I put all the code for the table. It should look like this.

RMojsiak_0-1639746351661.png

 

PhilipMannering
16 - Nebula
16 - Nebula

As much as I like regex, the XML Parse Tool should work better for parsing html. I'm still not sure exactly what you want to extract, but see the attached workflow as a potential starting point.

PhilipMannering_0-1639748310861.png

 

RMojsiak
8 - Asteroid

It worked! Thank you so much. I did some tweaks to make it look nice. Can't believe it was so simple😊

Labels