title: Regex to get everything but last word in sentence of words seperated by “/“?
body: <p>What would be the appropriate regex to get everything of a sentence except the final word:</p>
  
  <p>For example:</p>
  
  <pre><code>/hello/world     -&gt; /hello/
  /one/two/three   -&gt; /one/two/
  /foo/bar/ice/tea -&gt; /foo/bar/ice/
  </code></pre>