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

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #13: HTML Table Parsing

EmanueleE
8 - Asteroid

my solution

 


This post has been edited by Community Moderation to redact sensitive attachments. The original attachment has been replaced by post_placeholder.txt.

dominiklz
8 - Asteroid
Spoiler

this was a fun one to wake up in the morning 🙂 


This post has been edited by Community Moderation to redact sensitive attachments. The original attachment has been replaced by post_placeholder.txt.

adamp
7 - Meteor

I'm in need of an assist on this one. I'm trying to work the problem all the way through without checking the solution... Thanks ahead of time for any help :)

 

Spoiler
I've chosen to use RegEx to parse out the HTML. I've setup the RegEx tool as follows...

Alteryx103a.png

...and I'm getting tripped up on how to modify the regular expression to drop all that extra text coming into the first record without subsequently loosing text elsewhere...

Alteryx103b.png

Can someone throw me a hint and/or help me through the regular expression here?
1) I'm not 100% sure why the <td></td> at the beginning of Record#1 isn't coming back as its own record... wouldn't the asterik * in the RegEx allow for there being nothing between the <td> and </td> ?
2) I've tried putting a few of the characters from the "<table style="font-family:Arial,Verdana,Times;font-size:12px;text-align:left;width:100%;border-spacing:0px; padding:3px 3px 3px 3px">" section of the string into the exclude portion of my RegEx only they don't seem to work. Probably because I'm not using them correctly or haven't positioned them correctly?  Altered Regular Expression <td>[^ "=].*?</td>


bdaniels
8 - Asteroid

solution attached


This post has been edited by Community Moderation to redact sensitive attachments. The original attachment has been replaced by post_placeholder.txt.

CHarrison
8 - Asteroid

Probably could've cleaned this up a bit better, but it works 😉 


This post has been edited by Community Moderation to redact sensitive attachments. The original attachment has been replaced by post_placeholder.txt.

locunhalima
7 - Meteor

My solution.


This post has been edited by Community Moderation to redact sensitive attachments. The original attachment has been replaced by post_placeholder.txt.

ivoller
12 - Quasar

That one was fun. My solution was a little clunky until I saw the neat trick from @alex

 


This post has been edited by Community Moderation to redact sensitive attachments. The original attachment has been replaced by post_placeholder.txt.

joshuaburkhow
ACE Emeritus
ACE Emeritus

A good one! 


This post has been edited by Community Moderation to redact sensitive attachments. The original attachment has been replaced by post_placeholder.txt.

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
dillon_bok
8 - Asteroid

Definitely not dynamic but here is my solution:

Spoiler
Week13.PNG
jsdeter
8 - Asteroid

This post has been edited by Community Moderation to redact sensitive attachments. The original attachment has been replaced by post_placeholder.txt.