title: Regex help needed for splitting CSV file
body: <p>I have a section of code that needs to separate by commas, but not separated by commas inside quotes. I cannot use the csv module in python either. With the regex pattern I have, it works for everything except when there are multiple comma fields before the quotes, such as the ones I excerpted from the data. How should I manipulate the pattern of the regex or what should I add to it? Thanks</p>
  
  <p><strong>CSV File:</strong></p>
  
  <pre><code>,,,,,,,,
  Grand Total for ATHLET:,,,"1,312 ",,62:58:18,130.62 ,,
  ,,,,,,,,
  Grand Total for SELF:,,,"6,589 ",,397:57:58,708.53 ,,
  ,,,,,,,,
  </code></pre>
  
  <p><strong>excerpt of DataL:</strong></p>
  
  <pre><code>[Grand Total for ATHLET:,,,"1,312 ",,62:58:18,130.62 ,,]
  [Grand Total for SELF:,,,"6,589 ",,397:57:58,708.53 ,,]
  </code></pre>
  
  <p><strong>Regex code I currently have:</strong></p>
  
  <pre><code>Pattern = re.compile(r'''((?:[^,"']|"[^"]*"|'[^,]*'|'[^']*')+)''')
  dataL[i] = Pattern.split(dataL[i])[1::2]
  </code></pre>
  
  <p><strong>Current output:</strong></p>
  
  <pre><code>['Grand Total for ATHLET:', '"1,312 "', '62:58:18', '130.62', '']
  ['Grand Total for SELF:', '"6,589 "', '397:57:58', '708.53', '']
  </code></pre>
  
  <p><strong>Wanted output:</strong></p>
  
  <pre><code>['Grand Total for ATHLET:', '', '', '"1,312 "', '62:58:18', '130.62', '']
  ['Grand Total for SELF:', '', '', '"6,589 "', '397:57:58', '708.53', '']
  </code></pre>