title: Ruby regex - gsub only captured group
body: <p>I'm not quite sure I understand how non-capturing groups work. I am looking for a regex to produce this result: <code>5.214</code>. I thought the regex below would work, but it is replacing everything including the non-capture groups. How can I write a regex to only replace the capture groups?</p>
  
  <pre><code>"5,214".gsub(/(?:\d)(,)(?:\d)/, '.')
  # =&gt; ".14"
  </code></pre>
  
  <p>My desired result:</p>
  
  <pre><code>"5,214".gsub(some_regex)
  #=&gt; "5.214
  </code></pre>