日期:2014-05-18 浏览次数:21062 次
string str = "48 30 31 20 21 48 30 32 20 48 30 33"; string[] ss = str.Split("48".ToCharArray(),StringSplitOptions.RemoveEmptyEntries); /* * [0] " 30 31 20 21 " string [1] " 30 32 20 " string [2] " 30 33" string */
------解决方案--------------------
str.Split(new string[] { "48" }, StringSplitOptions.RemoveEmptyEntries);
------解决方案--------------------
System.Text.RegularExpressions.Regex.Split(str, @"\s*48\s*").Where(s => s != "").ToArray()