正则匹配试题


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


Regex reg = new Regex(patten);

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

Response.Write(match.Value);

}

原文地址:https://www.cnblogs.com/mqingqing123/p/12758894.html