I would like to create a regular expression in javascript to validate the annual income of a user. The problem I have is with the comma symbol, since a comma should be followed by 3 digits.
If I use this regex: (\d{3,3}\,)* then 1,000 will not match since it expects a comma at the end.
While if I use this regex: [\d]+(\,\d{3,3})* 1000,000 will match and it is not correct since it should be 1,000,000
Any help would be appreciated.
Thx in advance, Peter