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

what i get with 5.8.3 on linux:
Complex regular subexpression recursion limit (32766) exceeded at regex_limit.pl line 5.
are you using two different versions here maybe?
update:
with your exact command line example i'm getting "ok" as well, sorry...

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:41 UTC
    No, both the XML::Validator::Schema failure and the command-line success are happening with the same Perl, a custom-built copy of 5.6.1 on i686-linux.

    -sam

      are you really sure that is the exact regex? by making the regex just one little bit more complex i can get the error i stated above. e.g. (?:<object+>)+ instead of (?:<object>)+
        Yes, I'm reasonably sure. The only difference is that in XML::Validator::Schema the regex is built into a string and then compiled with qr//. But even that works from the command line:
        $ perl -e '$s = join("", (("<object>") x 160_000)); $re = qr/^(?:<o +bject>)+$/; print "ok\n" if $s =~ /$re/;' ok

        -sam