in reply to Re^4: $1 and regex
in thread $1 and regex

There are too many beginners who, once they learn about minimal matching, use it far too often. ... You'll only stay out of trouble by not being in doubt.

We all have to pass through doubt. The trick is to keep going once you're in it.

My advice to favor minimal matching is pragmatic. I've seen a lot more people get themselves into trouble using greedy matching than with non-greedy matching (when forming the part of the regex intended to skip over stuff that's not interesting). Since one way through doubt is to try a few experiments, the odds favor going minimal. This also plays the odds that you experiment succeeds on a small number of tests cases, but fails in the wild.