Regex reg = null;
Match mc = null;
reg = new Regex("<img.*/>");
string s = "<p><img src='images/s.jpg' /></p>";
if (reg.IsMatch(s))
{
mc = reg.Match(s);
s = s.Replace(mc.Value, "<span>"+mc.Value+"</span>");
}
MessageBox.Show(s);
㊣鑫哥
|
菜鸟二级
|园豆:270
|
2007-11-28 09:30