This expression will validate for US Currency with a wide range of input. Using other exps found on this site, I built this one to fix 2 main problems I was finding:
1-a space or blank entry is non-matching
2-use of .9 in place of .90 will match (this is for those people like me who hate to type and if I put .9 I mean .90
Hope this helps others save a little time. I feel I was pretty thorough in testing, but if you find something wrong, please post it. -Thanks
$1.99 | 1.99 | .99
$10.999 | 100,00.99 | blank
||Used bits of other exps found on this site to build this one
Title: Comma use
Date: 8/26/2010 1:36:09 PM
I was not sure if the expression is intended to match 100,100
Title: Negative Values
Name: Kirk Fuller
Date: 1/3/2006 11:42:13 AM
Good thought to have negative inputs, this should do it....
The change: Added a \-? before and after the \$?
This will allow you to input:
You can remove the \-? before or after the $ depending on your design.
Title: allow for negative currency amounts?
Date: 1/2/2006 4:30:22 PM
Hi Kirk, thanks for posting this expression. I'm trying to incorporate it but I do want to allow my users to match on a negative currency amount. Is there something I can add to extend your expression? I'd like to match: ($2.00) or -2.00, -2, etc.