Skip to content

Instantly share code, notes, and snippets.

@isuke
Created July 8, 2019 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isuke/efe5dc02b70fc347036398696cddf4d2 to your computer and use it in GitHub Desktop.
Save isuke/efe5dc02b70fc347036398696cddf4d2 to your computer and use it in GitHub Desktop.
12345678.to_s.reverse.scan(/.{1,3}/).join(',').reverse # => "12,345,678"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment