110,537
社区成员
发帖
与我相关
我的任务
分享
string pattern = @"SUM\(((?<c>\()|(?<-c>\))|[^()])+\)(?(c)(?!))";
string src = @"ISNULL(FCommitAmount,0)>=SUM(ISNULL(FAmount,0))+FTaxAmount
ISNULL(FCommitAmount,0)>=SUM(FAmount)+FTaxAmount";
MatchCollection mc = Regex.Matches(src, pattern);
foreach (Match m in mc)
{
MessageBox.Show(m.Value);
}