文本 “abcdef” Regex tempReg = new Regex("(b).*?(e)");
MatchCollection mat = tempReg.Matches(Content);
string s1 = mat[0].ToString();
这样 输出S1 为 “bcde”
我希望输出的是 ”cde“ 请问怎么去掉我用的那个关键字, 正则能直接解决么。
MatchCollection mat = tempReg.Matches(Content);
string s1 = mat[0].ToString();
这样 输出S1 为 “bcde”
我希望输出的是 ”cde“ 请问怎么去掉我用的那个关键字, 正则能直接解决么。
string strt = "abcdef";
string strReg = "(?<=b).*?(e)";
Regex tempReg = new Regex(strReg);
MatchCollection mat = tempReg.Matches(strt);
string s1 = mat[0].ToString();反向正声明