How can I create a create a java regular expression for a comma separator list
<p>How can I create a java regular expression for a comma separator list</p>

<p>(3)
(3,6)
(3 , 6 )</p>

<p>I tried, but it does not match anything:</p>

<pre><code>Pattern.compile("\\(\\S[,]+\\)")
</code></pre>

<p>and how can I get the value "3" or "3"and "6"  in my code from the Matcher class?</p>
