title: How to split string with date as delimiter?
body: <p>Could you help me with splitting large string into substrings?</p>
  
  <p>Scenario:
  In one of fields inside MySQL table I've got string in which there is an activity log in following format:</p>
  
  <pre><code>yyyy-mm-dd hh:mm:ss - Name1 Surname1 - Activity1
  yyyy-mm-dd hh:mm:ss - Name2 Surname2 - Activity2
  yyyy-mm-dd hh:mm:ss - Name3 Surname3 - Multiline Activity1
  Multiline Activity2
  Multiline Activity3
  yyyy-mm-dd hh:mm:ss - Name4 Surname4 - Activity4
  </code></pre>
  
  <p>Question:</p>
  
  <p>How can I split the above data into array like this:</p>
  
  <pre><code>id       date                    name                    activity
  1        yyyy-mm-dd hh:mm:ss     Name1 Surname1          Activity1
  2        yyyy-mm-dd hh:mm:ss     Name2 Surname2          Activity2
  3        yyyy-mm-dd hh:mm:ss     Name3 Surname3          Multiline Activity 1, Multiline Activity2, Multiline Activity 3
  4        yyyy-mm-dd hh:mm:ss     Name4 Surname4          Activity4
  </code></pre>
  
  <p>using PHP or MySQL query?</p>
  
  <p>I know it could be done somehow, but unfortunately by knowledge of PHP/MySQL doesn't allow me to parse text with variable delimiter (date), or maybe there is another way?</p>