in reply to Re: regexp: least inclusive match?
in thread regexp: least inclusive match?
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 stringSo while your '.+?' dictates a preference for the smallest amount of characters to match, in the end this preference is overruled.
|
|---|