I looked at the following posts but they did not help with this. It's probably simple, alas...
Express routes parameter conditions
https://forbeslindesay.github.io/express-route-tester/
I have the following regex - /^\d+x\d+/i
. I want a number separated by an x
, so a route would be /100x100
,
The regex works on it's own, but not as a route. I tried various escapeings but I keep getting a 404 back. What would be the correct syntax? (I tried something like this already router.get('/\/^\d+x\d+/i')
)
PS - As my plan is only to accept digit x digit
, I'd be happy to hear about any flaws in this regex.