110,549
社区成员
发帖
与我相关
我的任务
分享
Regex.Replace(str,@"\[DiaoYong=([0-9]{1,3})\]", new MatchEvaluator(RegexReplace));
private string RegexReplace(Match m) // 可以在方法中构建替换字符串
{
string Group1 = m.Groups[1].Value;
/* 操作
string strReturn = "……
*/
return strReturn ;
}
string number=Regex.Match(yourInput,@"(?i)\[DiaoYong=([0-9]{1,3})\]").Groups[1].Value;
if(number!="") FangFa(number);