PHP : Regex to extract data from web url : <p>I am receiving URL from an application as post data. </p>

<p>The URL has a signature : //abc.com/name?q=123456. </p>

<p>I want to extract name from the URL using regex ( Regular Expression )
How do I do that?</p>
