This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Discussion thread for day 19 of the Advent of Code : https://adventofcode.com/2020/day/19
Regex to the rescue...
Surprisingly simple solution in the end after a lot of troubleshooting. It works for both parts and can be turned into a macro-free solution.
Very similar to the both of you and I think I've made more iterative macros this month than I ever have in day to day Alteryx use!
Also a "bit" of regex... I used two iteratives: one to generate rule 0 and another to beautify the regex expression (remove extra brackets).
The same workflow works for both parts, after manual update of the rules... It took me a lot of trial and error to get it working for the updated rule 11. But regular-expression.info to the rescue.
I'm not sure I understood everything I did about Regex but eventually I got there, discovering recursive regex on the way.
@dsmdavid lovely recursive regex I'd have never have worked that out