Created
March 24, 2012 19:49
-
-
Save tbonemalone/2187257 to your computer and use it in GitHub Desktop.
javascript: remove commas from string of numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simple remove commas from string of numbers | |
str.replace(/,?\s/, ""); |
It is not work,
str.replace(/,\s?/g, "");
how to remove comma from $2,000,000.00 > expecting like $2000000.00
how to remove comma from $2,000,000.00 > expecting like $2000000.00
'$2,000,000.00'.replace(/,/g, '')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Dear,
I think that's right 💯