以下代码都在vs.net2005\xp下测试通过

字符串切割Split()一.
字符串切割Split()
字符串切割Split()二.
字符串切割Split()
//根据正则表达式来实现切割字符串切割的比较
字符串切割Split()
添加 using System.Text.RegularExpressions;
字符串切割Split()
字符串切割Split()            Console.WriteLine(
"以下是在正则表达式下用Split()后的显示");
字符串切割Split()            
string content = "agcsmallmacsmallgggSMallytx";
字符串切割Split()            
string[] resultString = Regex.Split(content, "small", RegexOptions.IgnoreCase);//注意RegexOptions是可以设置诸如大小写匹配等等属性
字符串切割Split()
            foreach (string i in resultString)
字符串切割Split()                Console.WriteLine(i.ToString());
字符串切割Split()            Console.WriteLine(
"\n");
字符串切割Split()
字符串切割Split()
字符串切割Split()
字符串切割Split()            Console.WriteLine(
"以下是字符串直接Split()后的显示");
字符串切割Split()

字符串切割Split()



字符串切割Split()三.使用匹配的正则表达式
字符串切割Split()

相关文章:

  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2021-08-27
  • 2022-12-23
猜你喜欢
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
相关资源
相似解决方案