Discussion thread for day 4 of the Advent of Code : https://adventofcode.com/2020/day/4
This was a fun one! Nothing like a little regex in the evening.
Love the smell of RegEx in the morning...
Decided to go for pure Regex validation - no tonumber-ings
My solution at Day04.
Using simple ToNumber function(Off course using RegEx_Match).
As anonymous user #1105310
Day 4 solution. Not that much Regex but one big filter for part 2 !
Day 4 - Tried to do it with no regex, but used a regexcount matches as I didn't write out a really long
substring([Field_1],2,1) IN ("0","1","2"..."a","b","c"...) for validating the hair colour.
Also the many filters helped finding the typo much easier than trying to next it to bring the overall tool count down.
Managed to get the right answers but it's clear i need to brush up on my regex syntax 😀
It's really great looking through how different people solve things!
Day 4 was interesting and very well suited to Alteryx. Actually probably easier in Alteryx than in a normal programming language.
If anyone wants my solutions, I put them here: https://github.com/NedHarding/Advent2020
My Day 4..
Going in "basic user" mode...
BTW... I'd love to see those Regex Expressions you (all) used later...
Definitely well suited to Alteryx - always love a good parsing exercise, especially if it includes a little RegEx!
Cheers!
NJ
My regex wasn't pretty, but I did get the right answer the first time (so I got lucky)
Day 4
I really enjoyed this one!
Part 1 and Part 2:
Part 1:
Part 2:
And here's day 4
Somehow I lost my workflow for this one. Posting this as proof that I got both stars
Edited. Rebuilt the workflow the same way I did the last time. Too many tools, and runs in only 0.6 seconds.
Shrink the data set filter by filter so everything runs faster (lessons from @MarqueeCrew and @Deanna via InspireEU in 2019!)
Day 4 | Remembered regex
I've just caught up with the first 4 days. I'm not sure if it's because of my role (Instructional in nature) or not, but I always tend to use more tools if it makes it clearer.
I used a text input with REGEX validation criteria, same as I would if I was validating all the fields in an incoming file for instance.
Text Input for Validation: