vendredi 14 octobre 2016

Java regex pattern for lists

What Java regex pattern should I use to match lists of positive integers in the notation (e.g. (5, 44, 1, 67, 114))? Each number should be followed by a comma then an arbitrary number of spaces:

"(4, 1, 19, 22, 540)"
"(84, 55, 7, 40, 77231, 18, 35, 13)"
"(6,    5794,       81, 2,  334)"

Aucun commentaire:

Enregistrer un commentaire