string s = "1234abc123444555efcdeeee"; int i = s.IndexOf("abc")+1; int j = s.IndexOf("ef"); string str = s.Substring(i, j - i+2);
str结果为:abc123444555ef,