Regex pattern = new Regex("(?
http(s)?|ftp)://(?([A-Za-z0-9-]+\\.)*(?[A-Za-z0-9-]+\\.[A-Za-z0-9]+))+((:)?(?
[0-9]+)?(/?)(?
(?[A-Za-z0-9\\._\\-]+)(/){0,1}[A-Za-z0-9.-/]*)){0,1}");
ya da
string url = "http://my.domain.com:8000?arg1=this&arg2=that"; System.Uri uri = new System.Uri(url); // port bilgisi int port = uri.Port; // host adı (my.domain.com) string host = uri.Host; // protokol bilgisi string protocol = uri.Scheme; // saf url string cleanURL = uri.Scheme + "://" + uri.GetComponents(UriComponents.HostAndPort, UriFormat.UriEscaped);
