title: Why is this Regex result unexpected
body: <p>The regex in question is </p>
  
  <pre><code>/(&lt;iframe.*?&gt;&lt;\/iframe&gt;)/
  </code></pre>
  
  <p>I am using this ruby regex to match sections of a string then creating an array of the results.</p>
  
  <p>The string is</p>
  
  <pre><code>"&lt;p&gt;&lt;iframe src=\"http://www.dailymotion.com/embed/video/k18WBkRTMldXzB7JYW5?logo=0&amp;#038;info=0\" frameborder=\"0\" height=\"450\" width=\"580\"&gt;&lt;/iframe&gt;&lt;/p&gt;\n&lt;p&gt;#1&lt;br /&gt;\n&lt;iframe src=\"https://www.cloudy.ec/embed.php?id=cabe5d3ba31da\" allowfullscreen=\"\" frameborder=\"0\" height=\"420\" width=\"640\"&gt;&lt;/iframe&gt;&lt;/p&gt;\n&lt;p&gt;#2&lt;br /&gt;\n&lt;iframe src=\"https://www.cloudy.ec/embed.php?id=b03d31e4b5663\" allowfullscreen=\"\" frameborder=\"0\" height=\"420\" width=\"640\"&gt;&lt;/iframe&gt;&lt;/p&gt;\n&lt;p&gt;#3&lt;br /&gt;\n&lt;iframe src=\"https://www.cloudy.ec/embed.php?id=f63895add1aac\" allowfullscreen=\"\" frameborder=\"0\" height=\"420\" width=\"640\"&gt;&lt;/iframe&gt;&lt;/p&gt;\n"
  </code></pre>
  
  <p>I am calling the regex is <code>.match()</code> like so</p>
  
  <pre><code>/(&lt;iframe.*?&gt;&lt;\/iframe&gt;)/.match(entry.content).to_a
  </code></pre>
  
  <p>The result is a duplicate of the first match</p>
  
  <pre><code>["&lt;iframe src=\"http://www.dailymotion.com/embed/video/k18WBkRTMldXzB7JYW5?logo=0&amp;#038;info=0\" frameborder=\"0\" height=\"450\" width=\"580\"&gt;&lt;/iframe&gt;", "&lt;iframe src=\"http://www.dailymotion.com/embed/video/k18WBkRTMldXzB7JYW5?logo=0&amp;#038;info=0\" frameborder=\"0\" height=\"450\" width=\"580\"&gt;&lt;/iframe&gt;"]
  </code></pre>
  
  <p>I used Rubular and I was able to get the Regex to work there <a href="http://rubular.com/r/CYF0vgQtrX" rel="nofollow">http://rubular.com/r/CYF0vgQtrX</a></p>