PHP preg_match, Finding a package name from Android URL address
<p>I need to get Android package name from the URL address.</p>

<p>Here is what I have done.</p>

<pre><code>$url = 'https://play.google.com/store/apps/details?id=com.gamevil.projectn.global&amp;feature=featured-apps#?t=W251bGwsMSwyLDIwMywiY29tLmdhbWV2aWwucHJvamVjdG4uZ2xvYmFsIl0.';
        preg_match("~id=(\d+)~", $url, $matches);
        $package_name = $matches[1];

        echo $package_name;
</code></pre>

<p>Package name should be "com.gamevil.projectn.global"</p>

<p>However, my code is not working.</p>

<p>Is there something that I  miss?</p>
