title: How to get all YouTube iframe from HTML using regex
body: <p>I want to get all YouTube <code>iframe</code> using regex and want to add specific tag to each record found.</p>
  
  <p>For example <code>&lt;youtube-frame&gt;&lt;/youtube-frame&gt;</code> to iframe begeing and end.</p>
  
  <p><strong>Needed output:</strong></p>
  
  <pre><code>&lt;youtube-frame&gt;&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/vakfMRyjulw" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;/youtube-frame&gt;
  
  &lt;youtube-frame&gt;&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/aDGWMlKPKDs" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;/youtube-frame&gt;
  </code></pre>
  
  <p><strong>My Code</strong></p>
  
  <pre><code>$embed = '
  &lt;iframe width="560" height="315" src="https://www.youtube.com/embed/vakfMRyjulw" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
  
  &lt;iframe width="600" height="350" src="https://tune.pk/player/embed_player.php?vid=6508414&amp;folderp2016/05/04/&amp;width=600&amp;height=350&amp;autoplay=no" frameborder="0" allowfullscreen scrolling="no"&gt;&lt;/iframe&gt;
  
  &lt;iframe width="560" height="315" src="https://www.youtube.com/embed/aDGWMlKPKDs" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
  
  &lt;iframe width="600" height="350" src="https://tune.pk/player/embed_player.php?vid=6508414&amp;folder=2016/05/04/&amp;width=600&amp;height=350&amp;autoplay=no" frameborder="0" allowfullscreen scrolling="no"&gt;&lt;/iframe&gt;
  
  &lt;iframe width="600" height="350" src="https://tune.pk/player/embed_player.php?vid=6508414&amp;folder=2016/05/04/&amp;width=600&amp;height=350&amp;autoplay=no" frameborder="0" allowfullscreen scrolling="no"&gt;&lt;/iframe&gt;
  ';
  </code></pre>
  
  <p><strong>What I have tried?</strong></p>
  
  <pre><code>$pattern = '/&lt;iframe\.*src=\"//youtube"\.*/';
  $iframeSrc = preg_match($pattern, $embed, $matches);
  var_dump($iframeSrc);
  </code></pre>