Skip to content

Instantly share code, notes, and snippets.

@delvedor
Last active July 7, 2017 12:48
Show Gist options
  • Save delvedor/3ffc1305f78d3b2814d17bf29db9f816 to your computer and use it in GitHub Desktop.
Save delvedor/3ffc1305f78d3b2814d17bf29db9f816 to your computer and use it in GitHub Desktop.
router.get('/test/%s/prova', /^hello$/gi, (request, response, params) => {
// some code
})
// └── /
// └── test
// └── /^hello$/gi
// └── prova (GET)
// multiple regex
router.get('/test/%s/prova/%s', /^hello$/gi, /^world$/gi, (request, response, params) => {
// some code
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment