should the capture be `([^?]+/)` instead?