Here's the code that works and thrives, but attempts to add a regular expression do not lead to anything ...
router.get('/id', function(req, res, next) { var id = req.params.id; res.render('profile',{ title: 'Профиль' }); }); I try in the most different combinations, but only this one works ...
router.get('/:id([0-9]{3,8})', function(...) Since the example is taken from the Internet. When I’m sailing something in the spirit:
router.get('/:id(/./)', function(...) router.get('/:id/./', function(...) router.get('/:id/(.)/', function(...) None of these options work, why? How to insert a regular expression in this case?