Regular expression to allow comma and space delimited number list
问题 I want to write a regular expression using javascript or jquery to allow comma delimited list of numbers OR space delimited numbers OR comma followed by a space delimited numbers OR a combination of any of the above ex anything that is not a digit, space or comma must be rejected SHOULD PASS 111,222,333 111 222 333 111, 222, 333 111,222,333 444 555 666, 111, 222, 333, should NOT pass: 111,222,3a 3a 111 222 3a etc etc I tried the code below they seemed to work however when I typed 3a as a