Re: pattern and infinite loop

no spam <[email protected]> Mon, 19 Jan 2009 09:38:01 -0500
Newsgroups gmane.comp.jakarta.oro.user
Message-ID <[email protected]>
--000e0cd4035aa9b36a0460d6deeb
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

>
> Presumably, you're concerned only with the capture group (containing
> the genre), so rewrite the expression along the following lines to
> avoid the ambiguous/excessive backtracking:
>
> p5c.compile("<span\\s+class=\"nametext\">[^<]*</span><br>[^<]*<font[^>]*>"+
>            "<strong>([^<]+)</strong></font>",
>            Perl5Compiler.SINGLELINE_MASK);
>

Yes that's correct.  This pattern prevented the looping it just didn't match
for that particular page.  I'll have to digest this pattern a bit more in my
head :o)

--000e0cd4035aa9b36a0460d6deeb--