title: php preg_match extract args
body: <p>Does anyone know how to get the int from this preg_match? It's only showing me the URI.</p>
  
  <pre><code>$uri = "/user/view/2";
  $pattern = "/user/view/[0-9]+";
  
  if(preg_match('#^' . $pattern . '$#', $uri, $matched)) {
      print_r($matched);
  }
  else {
      echo "No match!";
  }
  </code></pre>