Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

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 #4: Date Parsing

asteryx
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

 

elliemason
8 - Asteroid

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

RobertoEstrada
8 - Asteroid

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

TimothySr
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

 

 

keng
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. 

Scott_Anderson
Alteryx
Alteryx

Solution attached!

jwilson1
7 - Meteor

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

PeterGoldey
11 - Bolide

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

john_miller9
11 - Bolide

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
MarqueeCrew
20 - Arcturus
20 - Arcturus

@john_miller9

 

thanks for the positivity. 

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.