hi anyone knows how to replace a html tag in a string with specific characters: e.g.
string s1 = "<span style="italic">inluding <span style="bold">other</span> tags </span>";
string s2 = "<span style="italic">inluding </span><span style="bold">other tags </span>";
i want to replace "span" with "bold" to "bOpen" and "bClose" and to replace "span" with "italic" to "iOpen" and "iClose" in both c# and javascript. thanks very much.
thanks for the response, i did use regular expression to do that: res = Regex.Replace(res, ".*?", replaceHtmlBold); but it cant match the nested tag and none-nested tag at the same time. could you help please?