Skip to content

Instantly share code, notes, and snippets.

@igaiga
Created December 17, 2010 06:03
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 igaiga/744549 to your computer and use it in GitHub Desktop.
Save igaiga/744549 to your computer and use it in GitHub Desktop.
3桁ごとにカンマ区切り
total_amount.toString().replace( /([0-9]+?)(?=(?:[0-9]{3})+$)/g , '$1,' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment