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



"Dr.Ruud" <rvtol+news@xxxxxxxxxxxx> said:
>usenet@xxxxxxxxxxxxxxx schreef:
>> 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
>
>
>The 'Must occur ... no more than m times' is not accurate.

Hmm.. given a little bit more context, it is accurate:

AX{n,m}B

Here, to make the whole RE match, you must have an A, followed by at least
n, but no more than m Xs, followed by a B.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
.



Relevant Pages