比如:http://forum.csdn.net/PointForum/Forum/PostTopic.aspx
如何提取出 forum.csdn.net和PointForum/Forum/PostTopic.aspx这两段呢?

解决方案 »

  1.   

    try...
      static void Main(string[] args)
            {
                string zz = @"http://forum.csdn.net/PointForum/Forum/PostTopic.aspx";
                string[] array = zz.Split(new char[] { '/'});
                Console.WriteLine(array[2]);
                Console.WriteLine(array[3]+"/"+array[4]+"/"+array[5]);
            }
      

  2.   

       Uri _Uri = new Uri("http://forum.csdn.net/PointForum/Forum/PostTopic.aspx ");            _Uri.Authority;
                _Uri.LocalPath;我喜欢使用Uri类.