Niu Danny wrote, on 21 Mar 2025:
>
> Just came to me. 
> 
> When counting matches with quantifiers *from left to right*, 
> do we count the location of the quantifier (the characters "?*+")
> or the atom to which it applies (opening parentheses of the
> subexpression, or the repeated character(s))?

It can't be the location of the quantifier, because "left to right"
also applies to cases where there is no quantifier, for example
when (aa|aaa)(aaa|aa) is matched against aaaaa, the first
subexpression matches aaa and the second aa because the priority
is left to right.

-- 
Geoff Clare <[email protected]>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

Reply via email to