Thursday, February 08, 2007

Regular expressions for validating currency

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:


fr-CA currency formatting regular expression:




Blogger Dave Field said...


Found this post while searching for a currency regex to help with my cms project - and your's works instantly! Thanks!

6:39 AM  
Blogger Lizet Pena de Sola said...

Glad it helped. You're welcome...

9:05 AM  

Post a Comment

<< Home