我有这样一个带有html标记的字符串
<p>Go back nearly 30 000 years and you will find out (25)<u>ttt</u> carving painting and molding their visions of the world and (26)<u>ttt</u> into the rocky surfaces of Africa. As a (27)<u>ttt</u> David Colsens has spent years documenting the Art.<br />
&nbsp;&nbsp;&nbsp; We (28)<u>ttt</u> that the number of sites in Africa is well over a million you know It&rsquo;s probably closer to five million. And if you think that each site could have (29)<u>ttt</u> of images you get some idea of the enormous extent of this art you know it is quite (30)<u>ttt</u>. Equally extraordinary experts say is how closly their thoughts and struggles mirror those (31)<u>ttt</u> today. <br />
&nbsp;&nbsp;&nbsp; They were trying to express their congnitive system. They were trying to look at the (32)<u>ttt</u> reality. They were looking at issues that were depiction of (33)<u>ttt</u> kinds of thoughts and all this together really reprensents the way they looked at their whole (34)<u>ttt</u>.</p>如何把字符串中的<u>ttt</u> 全部替换成一个文本框<asp:TextBox runat="server"></asp:TextBox>谢谢大家能不吝赐教

解决方案 »

  1.   

    这个,你直接用一个编辑器,查找替换不就完了
    如果要程序实现的话,可以把这段当成一段XML来整,替换节点,
    也可以用正则找到你所需要的字符串,然后替换。。
      

  2.   

    string pstr = "<u>(.*?)</u>";
            str = Regex.Replace(str, pstr, "<asp:TextBox runat=\"server\"></asp:TextBox>");
      

  3.   

    string.Replace("<u>ttt</u>","<asp:TextBox runat=\"server\"> </asp:TextBox>");
      

  4.   

    strintText = stringText.Replace("<u>ttt </u>", "<asp:TextBox runat=\"server\"> </asp:TextBox");
    试试?吃饭去了,没时间测试,不好意思.
      

  5.   

    把字符串读出来然后用slipt(替换)这个方法把<u>换成<asp:TextBox runat="server"> </u>换成</asp:TextBox> 就可以了