On 2022-11-14 12:00, Bart Schaefer wrote:
Yes, it forces a match of the entire string. No, that's not the same as "greedy".
Right, it seems to me that 'greedy' is perfectly defined and 'whole string' isn't it. It's a rather subtle thing getting these pattern matches to do what a casual intuition might think they do. Throw in a negation and it's not simple. That line would be a good candidate for dissection in one of my imagined anatomy lessons. Really, it's half an hour to completely understand it.