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();
时间: 2024-11-06 14:05:21