in reply to Re^2: Greedy modifier found to be working non-greedy in a named group
in thread Greedy modifier found to be working non-greedy in a named group
The greedy operators still implement a leftmost-longest strategy. That means that the leftmost match will win even if you find a longer match later.
e* can match zero e. The leftmost place where you can match zero e is at the start of the string.
|
|---|