用字符串分割
1 using System.Text.RegularExpressions; 2 string str="aaajsbbbjsccc"; 3 string[] sArray=Regex.Split(str,"js",RegexOptions.IgnoreCase); //分割结果为aaa bbb ccc
用多个字符串分割
1 string str="aaajbbbscccjdddseee"; 2 string[] sArray=str.Split(new char[2]{'j','s'}); //分割结果为aaa bbb ccc ddd eee
用单字符分割
1 string str="aaajbbbjccc"; 2 string[] sArray=str.Split('j'); //分割结果为 aaa bbb ccc
参考网址
[1] https://blog.csdn.net/qq_29577295/article/details/90202037