title: Regular expression to extract the path from a full file location
body: <p>I would like to have a regular expression to extract the path from a full file location</p>
  
  <p>For example, having a path</p>
  
  <pre><code>#/home/java/bin/myfile
  </code></pre>
  
  <p>The regular expression should extract <code>/home/java/bin/</code></p>