title: Regex capture groups for csv with single quoted columns with escaped single quotes inside?
body: <p>I have a csv that has some columns quoted with single quotes. Inside one of these columns I have escaped single quotes that I want to be part of the capture group.</p>
  <p>Here is as far as I have got with my regex:</p>
  <pre class="lang-regex prettyprint-override"><code>(?&lt;time&gt;[^,]*),([^,]*),(?&lt;user&gt;[^,]*),(?&lt;ip&gt;[^,]*),([^,]*),([^,]*),(?&lt;type&gt;[^,]*),(?&lt;database&gt;[^,]*),'(?&lt;query&gt;[^',]*)
  </code></pre>
  <p>Here is a line from my log:</p>
  <pre><code>20220413 10:21:51,4c5c64e0ea2a,root,172.18.0.3,253985,19577453,QUERY,MyDatabase,'INSERT INTO MyDatabase.`ICProcessStatus` (`ICID`, `Status`, `AgencyUser`, `VBReason`, `DOLCReason`, `Ordinal`, `Date_Modified`)\n                \tVALUES ( NAME_CONST(\'_ICID\',11111),  NAME_CONST(\'_Status\',31),  NAME_CONST(\'_User\',NULL),  NAME_CONST(\'_VBReason\',NULL),  NAME_CONST(\'_DOLCReason\',NULL), 0,  NAME_CONST(\'_Date_Modified\',TIMESTAMP\'2022-04-13 10:21:51\'))',0
  </code></pre>
  <p>The query capture group should contain:</p>
  <pre><code>INSERT INTO MyDatabase.`ICProcessStatus` (`ICID`, `Status`, `AgencyUser`, `VBReason`, `DOLCReason`, `Ordinal`, `Date_Modified`)\n                \tVALUES ( NAME_CONST(\'_ICID\',11111),  NAME_CONST(\'_Status\',31),  NAME_CONST(\'_User\',NULL),  NAME_CONST(\'_VBReason\',NULL),  NAME_CONST(\'_DOLCReason\',NULL), 0,  NAME_CONST(\'_Date_Modified\',TIMESTAMP\'2022-04-13 10:21:51\'))
  </code></pre>