Yeah, at least some of the time, * becomes {0,32767}.

use re 'debug'; my $braces = qr/(?<braces>\{ ([^\{\}] | (?&braces))*? \} )/x; Compiling REx "(?<braces>\{ ([^\{\}] | (?&braces))*? \} )" Final program: 1: OPEN1 'braces' (3) 3: EXACT <{> (5) 5: MINMOD (6) 6: CURLYX[0] {0,32767} (29) 8: OPEN2 (10) 10: BRANCH (22) 11: ANYOF[\0-z|~-\377][{unicode_all}] (26) 22: BRANCH (FAIL) 23: GOSUB1[-22] (26) 26: CLOSE2 (28) 28: WHILEM[2/1] (0) 29: NOTHING (30) 30: EXACT <}> (32) 32: CLOSE1 'braces' (34) 34: END (0) anchored "{" at 0 floating "}" at 1..2147483647 (checking floating) mi +nlen 2 Freeing REx: "(?<braces>\{ ([^\{\}] | (?&braces))*? \} )"

- tye        


In reply to Re: Perl regex limitations (32k) by tye
in thread Perl regex limitations by jonneve

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.