Just taking an intuitive stab at that message: "Too many arguments for regexp internal reset..." -- hmmm. Too many of something or other... Maybe too many occurrences of "(.*)" placed between too many similar html tag patterns.

Those "(.*)"'s are all greedy matches, and if the regex engine decides that it needs to backtrack in order to satisfy the match, it seems like that might get pretty complicated -- lots of possible paths to take... probably too many!

So first thing to try: make them non-greedy -- you should be doing that anyway, in order for this thing to even come close to doing what you probably want.

Of course, the obvious thing to try would be a real HTML parsing module. (I wonder how many times this suggestion is offered in SoPW? -- in fact, how many times every day?) It's not that hard, and it comes out better.


In reply to Re: Wanted: Error Documentation by graff
in thread Wanted: Error Documentation by hesco

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.