> 2025年3月6日 23:06,Geoff Clare via austin-group-l at The Open Group > <austin-group-l@opengroup.org> 写道: >> >> >> >> e.g. `([0-9]+)+?` > > This is a pathological case because you are simultaneously asking for > both the longest and shortest match for the SAME part of the string. > Such cases ought not to occur in real-world use. > > What I meant, when I said it is not recursive, is something like: > > ([0-9]+[a-z]*)+? > > where the inner + and * are individually greedy; they don't inherit > the outer repetition's non-greediness.
But greedy quantifiers are still nested in a non-greedy one. Would you say that this is also pathological, or do you have something else on your mind?