I\'m not quite sure I understand how non-capturing groups work. I am looking for a regex to produce this result: 5.214. I thought the regex below would work, bu
5.214
non capturing groups still consumes the match use "5,214".gsub(/(\d+)(,)(\d+)/, '\1.\3') or "5,214".gsub(/(?<=\d+)(,)(?=\d+)/, '.')
"5,214".gsub(/(\d+)(,)(\d+)/, '\1.\3')
"5,214".gsub(/(?<=\d+)(,)(?=\d+)/, '.')