title: Replace the filename in Windows '\\' path
body: <p>I'm trying to remove the filename from a path created in C# (using Server.MapPath, which by default uses <code>\\</code>), like :</p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>C:\\Foo\\Bar\\Baz\\file.js
  </code></pre>
  
  <p>My current regex looks to be somewhat working in <a href="http://gskinner.com/RegExr/" rel="nofollow">RegExr</a> but in the real application it works just the opposite way :</p>
  
  <pre class="lang-none prettyprint-override"><code>\/[^\\]+$
  </code></pre>
  
  <p>What am I missing ?</p>