title: Conditional splitting in Javascript
body: <p>I need to split a string in javascript (no jquery).
  This is basically received fron csv.
  so, i have a string,</p>
  
  <pre><code>string = '"abc, xyz, mno","lmn, pqr, bcd, jkl"';
  </code></pre>
  
  <p>Note: Number of commas in quoted parts is not fixed for example, <code>"abc, xyz, mno"</code> can also be <code>"abc, xyz, mno, klm, ..."</code> or <code>"lmn, pqr, bcd, jkl"</code> could have been just <code>"lmn"</code>; i.e no comma at all.</p>
  
  <p>I want to split it as</p>
  
  <pre><code>str1 = 'abc, xyz, mno';
  str2 = 'lmn, pqr, bcd, jkl';
  </code></pre>
  
  <p>I can't do this with <code>string.split(",");</code>, due to undefined number of commas.</p>
  
  <p>Thanks for any help in advance.</p>