Regex for comma delimited list with line breaks

Viewed 584

The format I would like to allow in my text boxes are comma delimited lists followed by a line break in between the comma delimited lists. Here is an example of what I want from the user:

1,2,3
1,2,4
1,2,5
1,2,6

So far I have limited the user using this ValidationExpression:

^([1-9][0-9]*[]*[ ]*,[ ]*)*[1-9][0-9]*$

However with that expression, the user is only able to enter one row of comma delimited numbers.

How can proceed to accept multiple rows by accepting line breaks?

1 Answers
Related