Please help me to generate a code for valid URL under the following circumstances.
A valid URL should be one that:
* May or may not include http://
* Should not contain a space
* Should not contain invalid URL characters in the domain name part
* May contain entities such as %20 or + in the URL after the domain name part
* If there are query parameters, there must be a ? mark
A valid URL should be one that:
* May or may not include http://
* Should not contain a space
* Should not contain invalid URL characters in the domain name part
* May contain entities such as %20 or + in the URL after the domain name part
* If there are query parameters, there must be a ? mark
Comment