title: Regex to get src of iframe element
body: <p>I am trying to retrieve part of the src from different iframes from an HTML input.</p>
  <p>So far, I've tried different methods but none of them works for all iframes. What I've tried so far:</p>
  <pre><code>&lt;iframe(.*?)&gt;&lt;\/iframe&gt;
  &lt;iframe src=&quot;(.+?)&quot;.+&lt;/iframe&gt;
  &lt;iframe.+?src=[\&quot;'](.+?)[\&quot;'].*?&gt;
  </code></pre>
  <p>And here is a sample of iframe tags that I have:</p>
  <pre><code>&lt;iframe src=&quot;http://www.youtube.com/embed/NM51qOpwcIM?modestbranding=1;rel=0;showinfo=0;autoplay=0;autohide=1;yt:stretch=16:9;wmode=transparent;?wmode=transparent&quot; allowfullscreen=&quot;&quot; style=&quot;width: 640px; height: 361.057px;&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
  
  &lt;iframe src=&quot;https://www.youtube.com/embed/VASywEuqFd8?feature=oembed&quot; allowfullscreen=&quot;&quot; width=&quot;660&quot; height=&quot;371&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
  </code></pre>
  <p>Ideally, I would like to retrieve the src from the beginning and just before the first question mark (?) as such:</p>
  <pre><code>http://www.youtube.com/embed/NM51qOpwcIM
  </code></pre>