62,046
社区成员
发帖
与我相关
我的任务
分享
string tempStr = "具有高度相关性。图1:[image/qhfx-130-2.jpg]资料如下:<br>图2:[image/kjsw247-3.jpg]<br> 产品<br>图3:[image/qhfx-158-1.jpg]";
string pattern = @"\[([^]]*)\]";
tempStr = Regex.Replace(tempStr,pattern,@"<img src=""http://www.163.com/$1""/>");
/*
具有高度相关性。图1:<img src="http://www.163.com/image/qhfx-130-2.jpg"/>资料如下:<br>图2:<img src="http://www.163.com/image/kjsw247-3.jpg"/><br> 产品<br>图3:<img src="http://www.163.com/image/qhfx-158-1.jpg"/>
*/