C# 字符串切割——Split
string str="1,2,3,4,5"; string[] sArray=Regex.Split(str,",",RegexOptions.IgnoreCase);
多字符串
string str="aaajbbbscccjdddseee"; string[] sArray=str.Split(new char[2]{'j','s'}); //分割结果为aaa bbb ccc ddd eee
单字符串
string str="aaajbbbjccc"; string[] sArray=str.Split('j'); //分割结果为 aaa bbb ccc
转载:https://www.cnblogs.com/luyj00436/p/11658687.html