title: Splitting a string in Java only when a delimiter is surrounded by quote marks
body: <p>Let's say I have the following string:    </p>
  
  <pre><code>"John Doe","IT,SI","foo, bar"
  </code></pre>
  
  <p>And I would like to split it into:</p>
  
  <pre><code>["John Doe", "IT,SI", "foo, bar"]
  </code></pre>
  
  <p>I was thinking to implement something like this:</p>
  
  <pre><code>String line = "\"John Doe\",\"IT,SI\",\"foo, bar\"";
  String[] lineItems = line.split("\",\"");
  
  for (String lineItem : lineItems) {
      lineItem.removeAll("\"");
  }
  </code></pre>
  
  <p>It does the thing, however this doesn't seem to be a state of art. Is there a better solution?</p>