Is it possible to write a pattern like:
.get('/:pattern' ...
which matches only 6 symbols hashes?
How can I get this hash inside handler function?
Example of a hash: mBe8s0
Is it possible to write a pattern like:
.get('/:pattern' ...
which matches only 6 symbols hashes?
How can I get this hash inside handler function?
Example of a hash: mBe8s0
app.get('/:pattern([A-Za-z0-9]{5}$)', function (req, res){
res.send(req.params.pattern);
});