With the following RegExp I can capture the valid group.
^(\d+(,\d+)*)$
However, the capture must obtain invalid groups, as an example:
# Válido
12312,12312312,312312,1,3
1,2,3
999,999
# Inválido
,12312.*
123,12312,,12312312
asdasd,123123,12312
1,3123,asadas,123123
12312,12312312,312312,1,3,
,abc,321
The currently applied rule is:
Must start with numbers, followed (or not) by other numbers separated by commas.
Using the negation operator ?!
the effect is not as expected.
^(?!\d+(,\d+)*).*$