title: Comma separated words regular expression
body: <p>I'm having some issues while trying to parse expression such as the following:</p>
  
  <pre><code>word1, word2[a,b,c],   word3, ..., wordN
  </code></pre>
  
  <p>I'd like to get the following groups:</p>
  
  <pre><code>g1: word1
  g2: word2[a,b,c]
  g3: word3
  </code></pre>
  
  <p>Please note that the [.+] is optional, the regular expression must be able to match expressions like the following the following:</p>
  
  <pre><code>word1,word2,word3
  word1[a,b,c],word2,word3
  word1[a,b,c],word2[e,f,g],word3
  word1[a,b,c],word2[e,f,g],word3[i,j,l]
  </code></pre>
  
  <p>I did some attempts but I can't find the way to correctly separate the groups.</p>