正则表达式应用

MatchCollection ma = Regex.Matches(contt, @"([_]+\d+[_]+)|([_]+【小题\d+】[_]*)|(</u>【小题\d+】)", RegexOptions.Singleline | RegexOptions.Multiline | RegexOptions.IgnoreCase);
var build = new StringBuilder();
int bs = 0;
foreach (Match item in ma)
{
build.Append(item.Groups[0].ToString() + "^");
bs++;
}

 

posted on 2013-04-21 23:20  朝着  阅读(146)  评论(0编辑  收藏  举报