title: Regular Expression, remove everything after last forward slash
body: <p>I'm trying to use a regular expression within PowerShell to remove everything from the last slash in this string;</p>
  
  <pre><code> NorthWind.ac.uk/Users/Current/IT/Surname, FirstName
   NorthWind.ac.uk/Users/Dormant/DifferentArea/Surname, FirstName
  </code></pre>
  
  <p>I need to remove Surname, FirstName including the /. 
  The string should look like this.</p>
  
  <pre><code> NorthWind.ac.uk/Users/Current/IT
  </code></pre>
  
  <p>If someone could help me, I would be very grateful. </p>
  
  <p>I have tried this; <code>-replace '([/])$',''</code> but I can't seem to get it to work. </p>
  
  <p>Thanks</p>