title: Match the path of a URL, minus the filename extension
body: <p>What would be the best regular expression for this scenario?</p>
  
  <p>Given this URL:</p>
  
  <pre class="lang-none prettyprint-override"><code>http://php.net/manual/en/function.preg-match.php
  </code></pre>
  
  <p>How should I go about selecting everything between (but not including) <code>http://php.net</code> and <code>.php</code>:</p>
  
  <pre class="lang-none prettyprint-override"><code>/manual/en/function.preg-match
  </code></pre>
  
  <p>This is for an <a href="http://en.wikipedia.org/wiki/Nginx" rel="nofollow">Nginx</a> configuration file.</p>