using System.Text.RegularExpressions;===============================String url="http://www.baidu.com";String domain=Regex.Match(url, @"(?<=://)[a-zA-Z\.0-9]+(?=\/)").Value.ToString();