title: Simple regex match works on rubular but not in IRB
body: <p>Given the string:</p>
  
  <pre><code>"hello %{one} there %{two} world"
  </code></pre>
  
  <p>This code does not work:</p>
  
  <pre><code>s = "hello %{one} there %{two} world"
  r = Regexp.new(/(%{.*?})+/)
  m = r.match(s)
  m[0] # =&gt; "%{one}"
  m[1] # =&gt; "%{one}" 
  m[2] # =&gt; nil  # I expected "%{two}"
  </code></pre>
  
  <p>But on <a href="http://rubular.com" rel="nofollow">Rubular</a>, the same regex <code>(%{.*?})</code> works and returns <code>%{one}</code> and <code>%{two}</code>.</p>
  
  <p>What am I doing wrong?</p>