Borrowed a regex from Django to throw an error if the provided URL is not acceptable