I'm using this pattern: p5c.compile(".*?<td\\s+.+<span\\s+class=\"nametext\">"+ ".+?<strong>(.+?)</strong></font>.+?Profile\\s+Views", Perl5Compiler.SINGLELINE_MASK);
to try and pull genres out of myspace pages. However some pages like this result in infinite loops: http://www.myspace.com/pain How can I prevent these loops?