Created
October 22, 2015 13:49
-
-
Save carlossaraiva/a13936472c52df384be9 to your computer and use it in GitHub Desktop.
This file contains 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
function moneyFormatConvert(value: string) { | |
var money = new RegExp(/^((?:\d{1,3}\,?)+)(\.\d{1,2})/).exec(value); | |
return money[1].replace(/,/g, ".") + money[2].replace(".", ","); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment