Will parse a valid URL and break it down into its parts. Making it easier to handle for checking and anything else really in any given langage
The following link is a hastebin example of the parsing in Java
It will output the following https://haste.readonly.network/viheradehe.java
Match 1:
tdl: google.com
Match 2:
protocol: http:// tdl: foo.com path: /blah_blah
Match 3:
protocol: http:// tdl: foo.com path: /blah_blah/
Match 4:
protocol: http:// tdl: foo.com:
Match 5:
protocol: http:// tdl: foo.com:8080 path: /blah_blah
Match 6:
protocol: https:// tdl: www.example.com path: /foo/ params: ?bar=baz&inga=42&quux
Match 7:
protocol: https:// tdl: www.example.com path: /wpstyle/ params: ?p=364
Match 8:
protocol: https:// tdl: www.example.com path: /wpstyle/wpath/ params: ?p=364&?param=this
Match 9:
tdl: www.google.com