Question about perlreref - are {n} and {n}? different?



perlreref::QUANTIFIERS says:

Quantifiers are greedy by default -- match the longest leftmost.
Maximal Minimal Allowed range
------- ------- -------------
{n,m} {n,m}? Must occur at least n times but no more than m times
{n,} {n,}? Must occur at least n times
{n} {n}? Must occur exactly n times
[etc, snip]

Aren't {n} and {n}? really the same thing? You can't have greediness
if you stipulate an exact count, so you can't negate greediness if you
can't _have_ greediness, so {n}? (though it may be syntically correct)
makes no sense to me.

.



Relevant Pages