I am using a regex for allowing only valid numeric list i.e. 123, 456, 12, 123456789, 12
And this regex is working fine for this. Now I just want that max one can input 5 digit number in the list like
12,34,12345,12 - correct
12,123,123456,1234 - incorrect because this list contains a number more than 5 digits.
^[0-9]+(,[0-9]+)*$
Right now I am using this upper regex. Can anyone modify this regex so it will give solution to my question? ( Only regex for javascript please)