V
V
Vladimir Golub2021-07-13 18:31:13
Node.js
Vladimir Golub, 2021-07-13 18:31:13

How to write a regular expression in a route?

How to use regex in node.js route?

@Get([
      '/:category(opinions)/:asset([a-z0-9]{1, 7})'
  ])


PS
It works, but how to limit the length
'/:category(opinions)/:asset([a-z0-9]+)'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Golub, 2021-07-13
@RazerVG

Might be useful to someone
'/:category(opinions)/:asset([a-z0-9]{1\,3})'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question