title: Why does my non-greedy Perl regex still match too much?
body: <p>Say, I have a line that contains the following string:</p>
  
  <pre>
  "$tom" said blah blah blash.  "$dick" said "blah blah blah". "$harry" said blah blah blah.
  </pre>
  
  <p>and I want to extract </p>
  
  <pre>
  "$dick" said "blah blah blah"
  </pre>
  
  <p>I have the following code:</p>
  
  <pre><code>my ($term) = /(".+?" said ".+?")/g;
  print $term;
  </code></pre>
  
  <p>But it gives me more than I need:</p>
  
  <pre>
  "$tom" said blah blah blash.  "$dick" said "blah blah blah"
  </pre>
  
  <p>I tried grouping my pattern as a whole by using the non-capturing parens:</p>
  
  <pre><code>my ($term) = /((?:".+?" said ".+?"))/g;
  </code></pre>
  
  <p>But the problem persists.</p>
  
  <p>I've reread the Nongreedy Quantifiers section of Learning Perl but it's got me nowhere so far.</p>
  
  <p>Thanks for any guidance you can generously offer :)</p>