Today was bit easy again when you use a reluctant ...
# advent-of-code
k
Today was bit easy again when you use a reluctant regex modifier for the garbage.
s
What do you mean by "reluctant regex modifier", exactly? Is that indicated by the
?
in
<.*?>
?
k
Yup! Normally
*
is greedy, meaning it takes as much of the input as possible, and that would be problematic in a string like
"{<abc>}<abc>"
. Using
*?
makes it take as little of the input as possible.
s
Nice, thanks!