正则匹配试题


string patten = "(\\[[^\\]]*\\])";


Regex reg = new Regex(patten);

MatchCollection matches=reg.Matches(t);
foreach (Match match in matches)
{

Response.Write(match.Value);

}

posted @ 2020-04-23 10:11  启明星工作室  阅读(133)  评论(0编辑  收藏  举报