As Robert Harvey said, if all that bothers you is capturing numerical values ββfor use in your program, you can just break the commas and everything will be fine.
However, assuming this is a formatting issue (i.e. you check keystrokes and allow valid input or reformat the input as a valid numeric value), you can try something like this:
EDIT : ^[+-]?\d{1,3}(,\d{3})*(\.\d+)?$
What this does is allow any number of comma sets and 3 digits, followed by zero or one set of points, followed by one or more digits.
source share