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?
^-? # start of line, optional - (\d+ # any number of digits |(\d{1,3}(,\d{3})*)) # or digits followed by , and three digits ((,|\.)\d+)? # optional comma or period decimal point and more digits $ # end of line