52
SOLUTION MEGATHREAD-🎄- 2019 Day 4 Solutions -🎄-(self.adventofcode)
submitted 6 years, 1 month ago* (edited 7 minutes after) by daggerdragon to /r/adventofcode (134.8k)
since 6 years, 1 month ago
5 of 5
Tip Reveddit Real-Time can notify you when your content is removed.
your account history
Tip Check if your account has any removed comments.
view my removed comments you are viewing a single comment's thread.
view all comments


Regex
Part 1
Part 2
Matches valid passwords. I had to, sorry. Generate a list of integers in range, and count matches.
This is hate speech
I'm not even going to attempt parsing that but I do wonder how you wrote that.
Like, where did you even begin?
Some people did mention use of regex in their solutions, and I figured, hm, I think I could write the entire thing in regex (and because of https://www.xkcd.com/356/, I started working on it). I started with the part about digits never decreasing, and went down from here. I have used https://regex101.com/ to determine whether my regular expression works.
Alright, thanks. :)
I think that's pretty much how I would attempt to tackle it as well, but I certainly don't have as much patience as you do, lol.
Was mostly wondering if you had some 1337 trick up your sleeve. ;)
Dammit, now I kinda want to attempt doing this on my own...
Awesome work, btw!