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

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

  • Comment on Re^2: Is there a hard limit on + in a regex?

Replies are listed 'Best First'.
Re^3: Is there a hard limit on + in a regex?
by tinita (Parson) on Jul 09, 2004 at 18:53 UTC
    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

        Why don't you show us the regexp and perhaps the regexp as dumped by perl -Mre=debug? That's what will really tell you what is going on.