Regex HTML parse
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Solved! Go to Solution.
- Labels:
- Parse
- Transformation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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:
And I've configured the regex as follows:
Then you just need to transpose/Crosstab and you're away.
M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I think I put all the code for the table. It should look like this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It worked! Thank you so much. I did some tweaks to make it look nice. Can't believe it was so simple😊
