I\'m trying to make a number like 1234567 go to be 1,234,567, but need some help. My thoughts were that I could use a split with \\d{3} and then join a , to that. T
\\d{3}
i dont know if ruby has already an option to format numbers but in regex you can do this
/\G([+-]?\d+?)(?=(?:\d{3})++(?=\.\d++$|$))/g
then replace with this
\1,
sample: http://regex101.com/r/bA9cV2