using System.Text.RegularExpressions;
string str43 = "a[===]b[===]c[===]d";
string[] ary43 = Regex.Split(str43,@"/[===/]",RegexOptions.IgnoreCase);
string str43 = "a[===]b[===]c[===]d";
string[] ary43 = Regex.Split(str43,@"/[===/]",RegexOptions.IgnoreCase);
本文介绍了一种利用 C# 中 System.Text.RegularExpressions 命名空间的 Regex 类来拆分字符串的方法。通过示例代码展示如何设置正则表达式以识别特定模式并据此将字符串分割成数组。
916

被折叠的 条评论
为什么被折叠?



