I revised and updated the example. Now it should show correct display >>> https://www.dropbox.com/s/vsuh3hd8k6yd6 ... .capx?dl=0
The code works a bit better but its still broken with numbers less than 100, like 10 or 1.
The following regular expression will match positions which need a comma inserted. (\d)(?=(\d{3})+$)[/code:wpzipeuw] So the following RegexReplace should do the trick : [code:wpzipeuw]RegexReplace(str(value), "(\d)(?=(\d{3})+$)", "g", "$1,")[/code:wpzipeuw] Note that it will only work with integers.
The following regular expression will match positions which need a comma inserted.
(\d)(?=(\d{3})+$)[/code:wpzipeuw] So the following RegexReplace should do the trick : [code:wpzipeuw]RegexReplace(str(value), "(\d)(?=(\d{3})+$)", "g", "$1,")[/code:wpzipeuw] Note that it will only work with integers.
Thanks, the code works perfectly.
You need to add comma then <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink" /> and some expression >>> dropbox.com/s/vsuh3hd8k6yd6 ... .capx?dl=0
The code works well for numbers 1,000 and 1,000,000 but the code adds an extra comma at the end of numbers like 100,000. Also, the code doesn't work well with numbers less than 1,000. Constantly adding unnecessary commas everywhere.
I want to find out how to add commas to a string of numbers, ex. 1234567890 to 1,234,567,890. I saw a previous thread on this but the link to the solution was broken.
Develop games in your browser. Powerful, performant & highly capable.
I've made sure that it's on the right blend option and that everything was correct.