title: Regex to capture two groups from record
body: <p>I am working on an ETL to handle the parsing of machine generated logs.  These logs resemble flattened json files as csv files.  The payload of the json (and its length) depend on the log type, for example error, alarm, ...</p>
  <p>Every so often, a corrupt line occurs in the log files.  These corrupt lines combine two lines into a single and start with the special charcter <code>\x00</code>.  As such, these corrupt lines can be identified.  Still, I would like to retrieve and separate these two lines from the corrupt line.</p>
  <p>Data example (the corrupt line is line 3):</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>log file</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2019.09.12 07:32:00,121,INIED</td>
  </tr>
  <tr>
  <td>2019.09.12 09:21:50,611,ALARM  ,E,303,ARM 2 VACUUM ERROR !!</td>
  </tr>
  <tr>
  <td>\x00 2019.09.12 10:04:46,611,ALARM  ,O,501, Check machine 2019.09.12 10:06:22,611,ALARM  ,E,303,ARM 2 VACUUM ERROR !!</td>
  </tr>
  <tr>
  <td>2019.09.12 10:52:38,209,RESUM</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Ideally the corrupt record <code>\x00 2019.09.12 10:04:46,611,ALARM  ,O,501, Check machine 2019.09.12 10:06:22,611,ALARM  ,E,303,ARM 2 VACUUM ERROR !!</code> would be retrieved as</p>
  <ul>
  <li>group 1: <code>2019.09.12 10:04:46,611,ALARM  ,O,501, Check machine</code></li>
  <li>group 2: <code>2019.09.12 10:06:22,611,ALARM  ,E,303,ARM 2 VACUUM ERROR !!</code></li>
  </ul>
  <p>I started with a the capturing group <code>\d{4}.\d{2}.\d{2} \d{2}:\d{2}:\d{2}(.*)</code> to get everything after the timestamps.  This seemed the easiest method, as I cannot assume that the length of the line is fixed (due to the flattened json).</p>
  <p>Questions:</p>
  <ul>
  <li>I am unsure how to terminate my capturing group.  I was thinking to use the end of the line or the next timestamp it finds.  Any advice to combine these clauses?</li>
  <li>In addition, this method removes the timestamps themselves from the capturing group.  Should I use a different method?</li>
  </ul>