How to extract path from URL using Regex?
<p>I want to extract path from url. </p>

<pre><code>www.abc.com/contact/abc =&gt; /contact 
www.abc.com/contact.abc/asdsad =&gt; /contact.abc
www.abc.com/contact-abc.html/asdsad =&gt; /contact-abc.html
www.abc.com/contact-2 =&gt; /contact-2
www.abc.com/contact-us =&gt; /contact-us
abc&amp;/contact.abc&amp;^ = /contact.abc
</code></pre>

<p>What single regex could do this?</p>