110,561
社区成员
发帖
与我相关
我的任务
分享
string test = "[xxd][xxx][888]";
Regex reg = new Regex(@"\[(?<value>[^\]]*)\]");
MatchCollection mc = reg.Matches(test);
foreach (Match m in mc)
{
richTextBox2.Text += m.Groups["value"].Value + "\n";
}
public string[] Test(string input)
{
string regex = "(\\[\\w+])";
System.Text.RegularExpressions.RegexOptions options = ((System.Text.RegularExpressions.RegexOptions.IgnorePatternWhitespace | System.Text.RegularExpressions.RegexOptions.Multiline)
| System.Text.RegularExpressions.RegexOptions.IgnoreCase);
return Regex.Split(input, regex, options);
}
string test = "[xxd][xxx][888]";
Regex reg = new Regex(@"(?<=\[)[^\[\]]+(?=\])");
MatchCollection mc = reg.Matches(test);
foreach (Match m in mc)
{
richTextBox2.Text += m.Value + "\n";
}
public static void Display_Fuchsia()
{
string[] six=new string[你原来数组.Length];
for (int count = 0; count < 你原来的数组.Length; count++)
{
Regex reg = new Regex("(?<=[).*?(?=])");
Match ma = reg.Match(rtb.Text.ToLower());
while (ma.Success)
{
six[count]=你原来的数组[ma.index];
}
}
}