Weekly Challenge

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #4: Date Parsing

Highlighted
8 - Asteroid

Another good lesson - from trying the challenge and reading through the other solutions (@markp201 and@MarqueeCrew showing off some RegEx skills).

I should have thought of a simple formula in a new field to concatenate the RegEx results, but did a Transpose/Summarize instead.

Spoiler
Week4.PNG

 

Highlighted
8 - Asteroid

Fun developing Regex skills - made myself do it within one tool using the '|' or operator!

Highlighted
8 - Asteroid

OK, not sure if it is the best solution but it was fun to work on it.

Highlighted
6 - Meteoroid

My Solution: With RegEx parsing

 

Spoiler
Alt-4.png



One column Regular expression: .*((?:\d{2}-|(?:\l)\d-|\u\l{2}\s\d+)(?:\u+-|\s|,\s)(?:\d{4}|\d{2})).*
Identified and parsed All Dates into one column

 

 

Highlighted
8 - Asteroid

Great way to learn RegEx. 

 

For some reason doing /d+ at the beginning of a parse would only grab one of the digits for me, every time. So I ended up having to do five columns for that one date that had a single digit day: 

 

.*(\d\d-[[:alpha:]][[:alpha:]][[:alpha:]]-\d+).*|

.*([[:alpha:]][[:alpha:]][[:alpha:]]\s\d+,\s\d+).*|

.*(\d\d+-[[:alpha:]]+-\d+).*|

.*([[:alpha:]]{3,4}\s\d+\s\d+).*|

.*(\d-[[:alpha:]][[:alpha:]][[:alpha:]]-\d+).*

 

Definitely a super useful capability I was unaware of. 

Highlighted

Solution attached!

Highlighted
5 - Atom

Not the most flexible way to accomplish this, but it matches the answer. 

Highlighted
Alteryx Partner

Good thing I brushed up on RegEx at the conference.  Definitely a struggle. 

Highlighted
Alteryx Partner

Great opportunity to dive deeper into Regex.  Had a very clunky response until I looked at @MarqueeCrew 's solution which really helped me better understand approaching a regex challenge.

 

Spoiler
challenge_4.png
Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@john_miller9

 

thanks for the positivity. 

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.