I have the following code snippet:
string tmp = String.Format(\"
var url = "http://google.com:80/asd?qwe=zxc#asd"; var regex = new Regex(@":\d+"); var cleanUrl = regex.Replace(url, "");
the solution with System.Uri is also possible but will be more bloated.
System.Uri