title: Regex for everything before last forward or backward slash
body: <p>I need a regex that will find everything in a string up to and including the last \ or /.</p>
  
  <p>For example, c:\directory\file.txt should result in c:\directory\</p>