日期:2014-05-17 浏览次数:20994 次
string str="字符串";
var list = Regex.Matches(str, @"@([^(]+)\((\d+)\)").OfType<Match>().Select(t => new { name = t.Groups[1].Value, id = t.Groups[2].Value }).ToList();
string str = "字符串";
str = Regex.Replace(str, @"(@[^(]+)\((\d+)\)", "<M $2>$1<M>");