Monday, December 12, 2011

Regex to replace outside tags not content


//Replacing only span as Font
string strName = "<span> test </span>";
strName = Regex.Replace(strName, "<span>(.*?)</span>", "<Font>$1</Font>");

No comments:

Post a Comment