[refacor] more refactoring: trying to figure out the best way to compile a route pattern into a regex