如何用多个字符串来切分字符串

string str="我是小松鼠hsgg()jsjg776sdf";

string [] sArray=Regex.Split(str,"[hs][()]",RegexOptions.IgnoreCase);

 

int i =1;

foreach (string s in sArray)

{

       Console.WriteLine("i,{0},len:{1},s:{2}",I++,s.length,s);

}

 

Console.WriteLine("end");

Console.Red();

posted @ 2015-06-28 11:50  大林just  阅读(205)  评论(0编辑  收藏  举报