title: How to parse Telegram message by comma, but keep commas that are in parenthesis
body: <p>I have a PHP script that parses a telegram history message. It is comma separated, but grouped by parenthesis. I have tried a lot of things. Here is my current code that does not parse correctly.</p>
  <pre><code>$message = &quot;Message(id=1650, peer_id=PeerChannel(channel_id=1286966173), date=datetime.datetime(2022, 4, 15, 17, 14, 25, tzinfo=datetime.timezone.utc), message='Please check your email inbox', out=False, mentioned=False, media_unread=False, silent=False, post=True, from_scheduled=False, legacy=False, edit_hide=False, pinned=False, from_id=None, fwd_from=None, via_bot_id=None, reply_to=None, media=None, reply_markup=None, entities=[], views=382, forwards=0, replies=None, edit_date=None, post_author=None, grouped_id=None, restriction_reason=[], ttl_period=None)04-18-2022 01:25am&quot;;
  $keywords = preg_split(&quot;/,(?![^(]+\))/&quot;, $message);
  foreach($keywords as $value){
      echo &quot;$value&lt;hr&gt;&quot;;
  }
  </code></pre>
  <p>I am looking to parse the date and message.</p>