string strText="212.56.87.23 Dotnetspider.com"; Regex oRegex=new Regex(@"(?(\d|\.)+)\s"+@"(?\S+)"); MatchCollection oMatchCollection=oRegex.Matches(strText); foreach(Match oMatch in oMatchCollection) { Console.WriteLine("IP: "+oMatch.Groups["IP_ADDRESS"]); Console.WriteLine("URL: "+oMatch.Groups["URL"]); }