Store regex result when resolving routes