解决方案 »

  1.   

    void Main()
    {
    string str="1,2,3,4,1,5,45,458,1454,9654,24548,45454,15,0,5,35";
    var temp=Regex.Split(str,@"(?<=\G(?:\w+[,,]){3})");  
    temp.ToList().ForEach(t=>Console.WriteLine(t));  

    /*
    1,2,3,
    4,1,5,
    45,458,1454,
    9654,24548,45454,
    15,0,5,
    35
    */
    }http://blog.csdn.net/q107770540/article/details/6436973
      

  2.   

    如果不想要最后的逗号,可以这样来处理:temp.ToList().ForEach(t=>Console.WriteLine(t.TrimEnd(new char[]{',',','})));  
      

  3.   

    本帖最后由 caozhy 于 2013-11-27 16:52:38 编辑