Some of your example strings are not valid URLs (see
Uniform Resource Locator - Wikipedia, the free encyclopedia[
^]) or valid URIs (
Uniform Resource Identifier - Wikipedia, the free encyclopedia[
^]). So you have to define first what is allowed / to be supported.
This might be for example that a missing scheme is replaced by a default one like done by any browser which uses
http
by default or that a scheme without colon is treated as the server name of a Windows share.
Then split the input into parts and check each part using the part specific rules.
Note that there may be different rules for some parts depending on other parts. An example would be Windows shares (indicated by the server name as scheme without colon) where specific characters would not be allowed in path and file name parts while these characters are allowed in URLs (e.g. quotation mark and asterisk).