in reply to Re: Is there a hard limit on + in a regex?
in thread Is there a hard limit on + in a regex?

Your first two examples set the quantifier as {1,REG_INFTY} because they were simple enough to allow it (exact matches, no capturing, etc). You cannot explicitly name quantifiers higher than REG_INFTY and now I quote some comments from the source.

The default size for REG_INFTY is I16_MAX, which is the same as SHORT_MAX (see perl.h). Unfortunately I16 isn't necessarily 16 bits (see handy.h). On the Cray C90, sizeof(short)==4 and hence I16_MAX is ((1<<31)-1), while on the Cray T90, sizeof(short)==8 and I16_MAX is ((1<<63)-1). To limit stack growth to reasonable sizes, supply a smaller default. --Andy Dougherty 11 June 1998

Perhaps you can change this default locally?

Replies are listed 'Best First'.
Re^3: Is there a hard limit on + in a regex?
by BrowserUk (Patriarch) on Jul 09, 2004 at 20:12 UTC

    Dunno. I grepped for I16_MAX and found it is set to INT16_MAX. So I grepped for that, and couldn't find where that is defined?

    Anyhow, it appears that what I am seeing on Win32 is of little interest.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon