public string GetIp(string url) { var reg = new Regex(@"d{2,3}([.]d{1,3}){3}:d{2,5}"); var result = reg.Match(url); return result.ToString(); }