in reply to Re: regexp: least inclusive match?
in thread regexp: least inclusive match?

Sidhekin is right, with a minor change the regex will work.

This is because principle 0 of regex says

Principle 0: Taken as a whole, any regexp will be matched at the earliest possible position in the string
So while your '.+?' dictates a preference for the smallest amount of characters to match, in the end this preference is overruled.