Simple javascript formatCurrency function

Wrote this recently after finding an answer by Tim Pietzcker at [stackoverflow.com][stackoverflow]. Thought it was quite neat.

[stackoverflow]: http://stackoverflow.com/questions/2254185/regular-expression-for-formatting-numbers-in-javascript

Credit: Jeffrey Friedl, [Mastering Regular Expressions, 3rd. edition][oreilly], p. 66-67
[oreilly]:http://oreilly.com/catalog/9780596528126/

Posted in Blog, Develop
Tweets