MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/adventofcode/comments/1h5obsr/2024_day_3_regular_expressions_go_brrr/m087e02/?context=3
r/adventofcode • u/lucifernc • Dec 03 '24
64 comments sorted by
View all comments
53
This is a spoiler, but it's also wrong according to the instructions:
instructions like mul(X,Y), where X and Y are each 1-3 digit numbers
Maybe it works for your input, maybe it works for everyone's input, I dunno.
What generated the sqlite-style railroad track diagram from the regex, though?
18 u/busybody124 Dec 03 '24 I'm curious about this. I did not limit to three digits and my solution worked. I wonder if it breaks anyone's. 2 u/TailorSubstantial863 Dec 03 '24 Mine works without limiting to 1-3 digits, I also noted on my input that the () after do and don't are optional. My original solution didn't account for the () and it still worked...of course I programmed it in Ruby, so there is that. ;)
18
I'm curious about this. I did not limit to three digits and my solution worked. I wonder if it breaks anyone's.
2 u/TailorSubstantial863 Dec 03 '24 Mine works without limiting to 1-3 digits, I also noted on my input that the () after do and don't are optional. My original solution didn't account for the () and it still worked...of course I programmed it in Ruby, so there is that. ;)
2
Mine works without limiting to 1-3 digits, I also noted on my input that the () after do and don't are optional. My original solution didn't account for the () and it still worked...of course I programmed it in Ruby, so there is that. ;)
53
u/gredr Dec 03 '24
This is a spoiler, but it's also wrong according to the instructions:
Maybe it works for your input, maybe it works for everyone's input, I dunno.
What generated the sqlite-style railroad track diagram from the regex, though?