Official Problem Page
Use Regular Expressions with lookahead to not consume matches. This allows for overlapping matches, which is important for part two.
Example: eightwo
will match both eight
and two
. Without lookahead, the string eight
would be consumed, causing a missed match on the remaining wo
.
Part 1
Part 2