I don't remember saying that. If I did, I misspoke. In general, you can't do any better than to unroll the repetition: a{10000} is going to result in a 10000-state NFA.

I guess i inferred it from the discussion of construction costs earlier where you said that modern techniques avoid large construction costs.

Unicode and UTF-8, and because it does so fairly simply

Simply, unicode and regexes dont fit too well together. :-)

It is not possible to find the boundaries of an unanchored match in a single pass with a fixed amount of storage (like, say, a single start pointer and a state pointer).

Oh f**k. Thanks for straightening me out there. That makes things quite a bit trickier doesnt it?

True, but you can portably index into it if you use char & 0xFF, which is what the code does.

Ah right. Again thanks. I wasnt trying to be an arse by mentioning that btw, (although i ended up looking like one), its something that has come up quite a few times in the perl engine, so i thought it was just another example of an easy error to make. Should have expected someone as knowledgable as yourself to have considered it already. Sorry.

---
$world=~s/war/peace/g


In reply to Re^8: Perl regexp matching is slow?? by demerphq
in thread Perl regexp matching is slow?? by smahesh

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.