Expanding on Marius’s answer, you can provide the regex AND the parameter name:
app.get('/:id(\\d+)/', function (req, res){
// req.params.id is now defined here for you
});
Expanding on Marius’s answer, you can provide the regex AND the parameter name:
app.get('/:id(\\d+)/', function (req, res){
// req.params.id is now defined here for you
});