string myString = "hi there IP:127.0.0.1" string toBeSearched = "IP:"; string ipaddr = myString.Substring(myString.IndexOf(toBeSearched) + toBeSearched.Length);