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
A greedy match is the longest representation of the first match. In the case of /e*/ the first match is the start of the string, and is zero characters long because the first character is not an 'e'. In the case of /e+/ the first match starts at the first 'e' and continues until it finds a non-'e' character.
|
|---|