title: How remove end part of a path (string) using regular expression in MATLAB?
body: <p>Suppose that we have these strings in MATLAB:</p>
  
  <pre><code>xx = 'C:/MY_folder/This_gg/microsoft/my_file';
  </code></pre>
  
  <p>or</p>
  
  <pre><code>xx = 'C:/end_folder/This_mm/google/that_file';
  </code></pre>
  
  <p>I want remove expression after end <code>/</code> (<code>my_file</code> and <code>that_file</code>). How can I do this using regular expression in MATLAB?</p>