Using a regex to test url so that query strings can be passed