I'm creating PHP routing library. I doubt about default behavior for defining RegExp routes.
There is two alternatives, with (^ and $) by default, or without it.
1. /news/[id:[0-9]+]
/news/[slug:today.*]
2. /news/[id:^[0-9]+$]
/news/[slug:^today]
First looks more convenient for defining routes. Second looks like any other RegExp as we writing it outside of routing.
What do you think about it?
There is the issue: https://github.com/baryshev/TreeRoute/issues/3