title: Regex to find commas that aren't inside "( and )"
body: <p>I need some help to model this regular expression. I think it'll be easier with an example. I need a regular expression that matches a comma, but only if it's not inside this structure: <code>"( )"</code>, like this:</p>
  
  <pre><code>,a,b,c,d,"("x","y",z)",e,f,g,
  </code></pre>
  
  <p>Then the first five and the last four commas should match the expression, the two between <code>xyz</code> and inside the <code>( )</code> section shouldn't.</p>
  
  <p>I tried a lot of combinations but regular expressions is still a little foggy for me.</p>
  
  <p>I want it to use with the split method in Java. The example is short, but it can be much more longer and have more than one section between "( and )". The split method receives an expression and if some text (in this case the comma) matches the expression it will be the separator.</p>
  
  <p>So, want to do something like this:</p>
  
  <pre><code>String keys[] = row.split(expr);
  System.out.println(keys[0]); // print a
  System.out.println(keys[1]); // print b
  System.out.println(keys[2]); // print c
  System.out.println(keys[3]); // print d
  System.out.println(keys[4]); // print "("x","y",z)"
  System.out.println(keys[5]); // print e
  System.out.println(keys[6]); // print f
  System.out.println(keys[7]); // print g
  </code></pre>
  
  <p>Thanks!</p>