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

Understanding Regular Expressions says
Items governed by * (and *?) are optional not only once, but repeatedly forever (well, to be pedantic, Perl currently has an internal limit of 32K repeats for parenthetical items).

We're not really tightening our belts, it just feels that way because we're getting fatter.

Replies are listed 'Best First'.
Re^2: Is there a hard limit on + in a regex?
by samtregar (Abbot) on Jul 09, 2004 at 18:48 UTC
    Alright, that sucks but I guess there's no changing it. So why did my command-line attempt to verify this fail?

    -sam

      It depends which of the nodes CURLYX, WHILEM, CURLYM, CURLYN, CURLY, STAR, PLUS were used by the regular expression compiler. This is a measure of how "naughty" you expression is so using anything besides (?: exact string )+ is edging into a realm where + has a limit.
Re^2: Is there a hard limit on + in a regex?
by Anonymous Monk on Jul 09, 2004 at 19:36 UTC
    Uh, just pointing out that the article you're referring to is talking about perl 5.002. The author even talks about running it on his 175 MHz DEC Alpha and having the code take 4 hours.
      True, but I haven't found any perldelta that says it has changed.

      We're not really tightening our belts, it just feels that way because we're getting fatter.