日期:2014-05-18 浏览次数:20926 次
string source = @"user:<username>code:<code>"; Regex reg = new Regex(@".*(?<u><username>).*(?<c><code>)"); source = reg.Replace(source, @"?{u}=dr[""username""],?{c}=dr[""code""]");