posted 14 years ago
I think that in the expression [-+], the - is being interpreted as a special character - as in [a-z] or [0-9]. Try escaping it as [\\-+] instead.
Also, here are some sample inputs that I think are likely to be considered numbers, according to your current regex:
12,34,56
,123
123,,456
,,,,,,
,
.
(and last, a blank line, which I can't really show clearly)
It's up to you whether these special cases are important enough to justify further modifying the regex to disallow them.