title: node js - get url params from original base url
body: <p>In my node JS express app I have defined routes with path having regex expressions in my app.js file. i.e</p>
  
  <pre><code>var tableRoute = require('./routes/tables');
  app.use('/keyspaces/(regex to match param)/tables',tableRoute);
  </code></pre>
  
  <p>Then in my routes/tables.js file I have following handler defined for this route</p>
  
  <pre><code>router.get('/', function(req, res, next) {
  // need to access url param here
  });
  </code></pre>
  
  <p>Now clearly I cannot access my url param via req.params.xzy because here handler is defined for '/' not for '/keyspaces/:xzy/tables', is there any way I can access this url param here from original base url.</p>