Routes URIs to methods using regex