摘要:
1。在正则表达式中定义变量并调用:usingSystem;usingSystem.Text.RegularExpressions;publicclassTest{publicstaticvoidMain(){//Definearegularexpressionforrepeatedwords.Regexrx=newRegex(@"\b(?<word>\w+)\s+(\k<word>)\b",RegexOptions.Compiled|RegexOptions.IgnoreCase);//Defineateststring.stringtext=&qu 阅读全文