>> how do we incorporate the `REG_MINIMAL` flag? > > I think my suggested wording works with REG_MINIMAL because of the way it > is specified in 9.4.6 list item 6 as changing the default (and reversing > what the '?' modifier does). > >> if both greedy **AND** lazy quantifiers're nested ... > > That was the reason for wording it as "longest possible ... for which any > minimal repetitions used ... have the shortest possible match". A minimal > repetition nested inside a greedy one has precedence (if used); otherwise, > each just follows its normal rule. >
What about a lazy quantifier nested in a greedy one inside another lazy one like the following: > e(c(a[0-9]+?b)+d)+?f Sure, a minimal repetition takes precedence when inside a greedy one, but what about the oppositely cross-conflicting case like the one above? (Sorry about not being able to come up with test cases for that)
