pediapress/mwlib — pull request #10 by UltraNurd (2012-02-28 23:48:32+00:00)
Title: Long-running regex

I ran into an apparently indefinite hang on the iferror_rx due to the val being several thousand characters, and containing a large number of HTML tags. (I happened to be attempting to parse the page "Aardvark".) I don't know if this is an ideal fix, but it at least solved the problem, by searching for the most important part of the error class attribute (fast, since it doesn't contain a lot of conditional matching) and then expanding to the opening and closing carets of the tag to verify with the original regex.