请高手帮忙:如何把“...[...]...”替换成“.../[.../]...”c#中

解决方案 »

  1.   

    string strRep = "...[...]...";
    strRep = strRep.Replace("strRep", ".../[.../]...")
      

  2.   

    补充
    第二行结尾喽了分号
    strRep = strRep.Replace("strRep", ".../[.../]...");
      

  3.   

    strRep = strRep.Replace("strRep", ".../[.../]...");-->strRep = strRep.Replace(strRep, ".../[.../]...");
      

  4.   

    追加
    sting str2 = @".../[.../]...";
    strRep = strRep.Replace(strRep, str2);
    你在试试
      

  5.   

    ``sting strs;  strs = str.Replace("[...]", "/[.../]");
     
    ```  这个不是转译字符````` 应该可以使用`````
       
      

  6.   


    System.String str = “...[...]...”;
    str = str.replace("[...]", "/[.../]"); 
      

  7.   

    string strRep = "...[...]...";
    strRep = strRep.Replace("[...]", "/[.../]");
    MessageBox.Show(strRep);测试通过
      

  8.   

    code=C#]
                            string strRep = "sdafa[cvzcx]qerq";  strRep = strRep.Replace("[", "/[");
    strRep = strRep.Replace("]", "/]");
    [/code]
      

  9.   


    string strRep = "sdafa[cvzcx]qerq";  strRep = strRep.Replace("[", "/["); 
    strRep = strRep.Replace("]", "/]"); 
      

  10.   

    为什么 内容=Regex.Replace("内容","[", "/[");  会报错?
      

  11.   

                string temp = "sdf[dddd]";
                string str = temp.Replace("[", "/[");
                str = str.Replace("]", "/]");
                MessageBox.Show(str);