110,538
社区成员
发帖
与我相关
我的任务
分享
string tempStr = "asdasdasd[www.baidu.com]xvdfsdfg";
string[] array = Regex.Split(tempStr, @"\[|\]");
Regex reg = new Regex(@"(?is)([^[【]+?)[\[【]([^\]】]+?)[】\]](.+)");
foreach (Match m in reg.Matches(str))
{
Response.Write(m.Groups[1].Value + "<br/>" + m.Groups[2].Value + "<br/>" + m.Groups[3].Value);
}
/*
asdasdasd
www.baidu.com
xvdfsdfg
*/