in reply to Re: match longest sequence in an "or" RE
in thread match longest sequence in an "or" RE
Oh, which leftmosts are there? Well, there's the leftmost starting point in the target string, and there's the leftmost choice in alternation.
POSIX regular expressions find the leftmost match in the target string, but from all possible matches from that starting point, it will return the longest.
|
|---|