title: URL String Get Directory
body: <p>I have a string that contains a URL:</p>
  
  <pre><code>var url = "http://www.domain.com/Shared%20Documents/Test%20Plans/CC-12%20Test%20Plan.doc";
  </code></pre>
  
  <p>I am trying to get the url of the directory (ie remove the filename and keep the rest.)
  I realize that this is probably pretty simple but I can't seem to find anything on it.</p>
  
  <p>Desired result:</p>
  
  <pre><code>var url = "http://www.domain.com/Shared%20Documents/Test%20Plans/";
  </code></pre>