Determine if a url matches a Route, and pull out the terms if it does
- by Kevin Montrose
I've got a big old log file I'm trying to break down in terms of routes.
Essentially, I'm getting input of a path (/questions/31415 for example) and a list of all the registered Routes. What I want out is a Route and the parameters specified in the route (so in, /questions/{id}/{answer} I'd get id and answers out).
I've got a working solution…