Are patterns or regexs allowed in route definitions?


Is it possible to use string patterns or regular expressions in route definitions similar to how Express handles their route paths?

For my purposes I can probably just use middleware to achieve my goal but I was curious if it was possible. I know many frameworks allow this functionality in their routing engines so I wanted to make sure I wasn’t overlooking something in the docs.

Thanks again,


Yes, Adonis uses path-to-regexp, so simply follow their docs for regex


Ah, great. Thanks again!