I'm using the following regex
/^\/(\d{5})$/
in a express route and I'm getting the following error
SyntaxError: Invalid regular expression:
/^\/^\/(?(?:([^\/]+?)){5})$\/?$/:Invalid group.
This is the code I'm using:
app.get("/^/(\d{5})$/", function(req, res, next){ console.log(req.params[0]); )};
The regex works just fine when tested on the browser.
Thanks.