here are some things from the creators of Regex Buddy. They came from the library, so I'm sure they were thoroughly tested.
Number: currency amount (cents required) Additional thousands separators; mandatory double-digit share
Match; JGsoft: ^[+-]?[0-9]{1,3}(?:,?[0-9]{3})*\.[0-9]{2}$
Number: currency amount (optional cent) Additional thousands separators; optional double-digit fraction
Match; JGsoft: ^[+-]?[0-9]{1,3}(?:,?[0-9]{3})*(?:\.[0-9]{2})?$
Number: amount in US and EU currencies (cents optional) Can be used in the form of 123,456.78 in the US style and in the European style 123,456,78. Additional thousands separators; optional double-digit fraction
Match; JGsoft: ^[+-]?[0-9]{1,3}(?:[0-9]*(?:[.,][0-9]{2})?|(?:,[0-9]{3})*(?:\.[0-9]{2})?|(?:\.[0-9]{3})*(?:,[0-9]{2})?)$
Keng Dec 9 '08 at 20:57 2008-12-09 20:57
source share