title: need find from text all "src" elements
body: <p>i need get from text all "src" elements. "src" can have " or '.
  Text found in the well, but if element have id, style... They also grabbed.
  I need only src value.</p>
  
  <p>My code:</p>
  
  <pre><code>$html = 'text text &lt;img src="img1.png"/&gt; as as &lt;img src=\'second.gif\' id ="test" /&gt; as';
  
  preg_match_all('/src=("|\')([^"]*)("|\')/', $html, $htmlSrc);
  
  echo '&lt;pre&gt;';
  print_r($htmlSrc);
  
  Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; src="img1.png"
              [1] =&gt; src='second.gif' id ="
          )
  
      [1] =&gt; Array
          (
              [0] =&gt; "
              [1] =&gt; '
          )
  
      [2] =&gt; Array
          (
              [0] =&gt; img1.png
              [1] =&gt; second.gif' id =
          )
  
      [3] =&gt; Array
          (
              [0] =&gt; "
              [1] =&gt; "
          )
  
  )
  </code></pre>