title: How can I parse a CSV string with JavaScript, which contains comma in data?
body: <p>I have the following type of string</p>
  <pre><code>var string = &quot;'string, duppi, du', 23, lala&quot;
  </code></pre>
  <p>I want to split the string into an array on each comma, but only the commas outside the single quotation marks.</p>
  <p>I can't figure out the right regular expression for the split...</p>
  <pre><code>string.split(/,/)
  </code></pre>
  <p>will give me</p>
  <pre><code>[&quot;'string&quot;, &quot; duppi&quot;, &quot; du'&quot;, &quot; 23&quot;, &quot; lala&quot;]
  </code></pre>
  <p>but the result should be:</p>
  <pre><code>[&quot;string, duppi, du&quot;, &quot;23&quot;, &quot;lala&quot;]
  </code></pre>
  <p>Is there a cross-browser solution?</p>