good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Wanted: Error Documentationby graff (Chancellor) |
on Mar 21, 2006 at 05:06 UTC ( [id://538130]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|