I have a simple regex that should match words made of letters (0-5) only however it doesn't seems to be working. How should the regex look and be used in ExpressJS? URL I am trying to validate may look like something.com/abcd
var express = require("express"),
app = express();
app.get("/:id(^[a-z]{0,5}$)", function(req, res) {
res.send("The right path!");
});
app.listen(8000);