title: Sed capturing too much during substring extraction
body: <p>I'm trying to parse a curl response in order to retrieve an img src, identified with the alt tag <code>captcha</code>.</p>
  
  <p>So to test my <code>sed</code> expression I tried the following:</p>
  
  <pre><code>echo 'alt="captcha" src="http://example.com/foo.html" /&gt;&lt;/p&gt;' | sed -n 's/.*alt="captcha" src="\([^"]*\)/\1/p'
  </code></pre>
  
  <p>However this echos</p>
  
  <pre><code>http://example.com/foo.html" /&gt;&lt;/p&gt;
  </code></pre>
  
  <p>How can I simply return</p>
  
  <pre><code>http://example.com/foo.html
  </code></pre>
  
  <p>?</p>
  
  <p>I am new to <code>sed</code> so I would like to know where I'm going wrong.</p>