split

string res = "abc, , ,_  ,_,c,b,c   ,abde,r.e";         

char[] chs = new char[] { ' ', '.', '_', ',' };//不想要的分割符

string[] strnew = res.Split(new char[] { ' ', '.', '_', ',' }, StringSplitOptions.RemoveEmptyEntries);

原文地址:https://www.cnblogs.com/yzc19838458/p/4281988.html