Embedded as I am in globalizing applications I thought I would create this entry for future reference.
More than once I have to validate user input and more than once that input is a currency value. The currency symbols are not part of the expressions here.
For en-US or en-CA:
^(\d{1,3})(,\d{3})*(\.\d{2})?$
fr-CA currency formatting regular expression:
^(\d{1,3})(\s{1}\d{3})*(,\d{2})?$
Ttyl!
Hi,
Found this post while searching for a currency regex to help with my cms project – and your’s works instantly! Thanks!
Glad it helped. You’re welcome…