title: Logstash Grok pattern to cut split a string and remove last part
body: <p>Below is the field that is filebeat log path, that I need to split with delimiter '/' and remove the log file name in the text.</p>
  
  <pre><code>"source" : "/var/log/test/testapp/c.log"
  </code></pre>
  
  <p>I need only this part </p>
  
  <pre><code>"newfield" : "/var/log/test/testapp"
  </code></pre>