62,046
社区成员
发帖
与我相关
我的任务
分享
string str = "abcdef";
string v = @"b(\w+)e";
Regex rg = new Regex(v, RegexOptions.IgnoreCase | RegexOptions.Singleline);
string str2 = "";
//str2 = rg.Match(str).Value;
//MessageBox.Show(str2);
str2 = rg.Match(str).Groups[0].Value.ToString();
MessageBox.Show(str);
string str = "abcdef";
string v = @"b(?<txt>\w+)e";
Regex rg = new Regex(v, RegexOptions.IgnoreCase | RegexOptions.Singleline);
string str2 = "";
str2 = rg.Match(str).Groups["txt"].Value.ToString();
这个意思? string xx = "abcdef";
if (xx.Contains("cd"))
{
}