I can\'t figure out how to construct a regex for the example values:
123,456,789 -12,34 1234 -8
Could you help me?
Try this:
^-?\d{1,3}(,\d{3})*(\.\d\d)?$|^\.\d\d$
Allows for:
1 12 .99 12.34 -18.34 12,345.67 999,999,999,999,999.99