attempting to match the following router
# GET /measurements/2013-10-10T16:20:00.000Z
Currently using this code:
var router = express.router();
router.get(/measurements\/:date(.*Z$), ResultCtrl.processRequest)
what am I missing here ?
attempting to match the following router
# GET /measurements/2013-10-10T16:20:00.000Z
Currently using this code:
var router = express.router();
router.get(/measurements\/:date(.*Z$), ResultCtrl.processRequest)
what am I missing here ?
Try
router.get('/measurements/:date(^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$)', ResultCtrl.processRequest)
That will match a timestamp of the form ####-##-##T##:##:##.###Z
, where each #
is a digit.