ListsubIndex = new List(); string A = "ssddxx等级:12kkkcxc12kkk等级:31sxsd1xd等级:52kkkcsdfsdf2k等级:44"; int ii = A.IndexOf("等级"); while (ii >= 0 && ii < A.Length) { subIndex.Add(ii); ii = A.IndexOf("等级", ii + 1); } int[] arrIndex = subIndex.ToArray(); //你要的数组