title: regex taking a long time
body: <p>I have the following script, which grabs a webpage, then does a regex to find items I'm looking for:</p>
  
  <pre><code>use warnings;
  use strict;
  use LWP::Simple;
  
  my $content=get('http://mytempscripts.com/2011/09/temporary-post.html') or die $!;
  $content=~s/\n//g;
  $content=~s/&amp;nbsp;/ /g;
  $content=~/&lt;b&gt;this is a temp post&lt;\/b&gt;&lt;br \/&gt;&lt;br \/&gt;(.*?)&lt;div style='clear: both;'&gt;&lt;\/div&gt;/;
  my $temp=$1;
  
  
  while($temp=~/((.*?)([0-9]{1,})(.*?)\s+(.*?)([0-9]{1,})(.*?)\s+(.*?)([0-9]    {1,})(.*?)\s+)/g){
  print "found a match\n";
  }
  </code></pre>
  
  <p>This works, but takes a long, long time. When I shorten the regex to the following, I get the results in less than a second. Why does my original regex take so long? How do I correct it?</p>
  
  <pre><code>while($temp=~/((.*?)([0-9]{1,})(.*?)\s+(.*?)([0-9]{1,})(.*?)\s+(.*?)([0-9]    {1,})(.*?)\s+)/g){
  print "found a match\n";
  }
  </code></pre>