我爱.net从第一个"[" 截取到最后一个"]"也就是把quote标签中的内容连带标签一个除掉:剩下 我爱.net大大们,帮忙噢噢噢!

解决方案 »

  1.   

    正则表达式,替换掉 \[quote\].*\[/quote\]
      

  2.   


    晕 被csdn给吃了  标签在这里【quote=53583604】吃我【/quote】啊啊 
      

  3.   

    String.Substring(Int32, Int32)
    这个行不?
    string txt=[我爱.net];
    txt.Substring(1, 6);
      

  4.   

    回楼上,动态的啊!大哥如何是这样的怎么半呢
    我爱.net我爱死.net【quote=53583604】吃我【/quote】啊啊 
      

  5.   

    直接替换不行么str.Replace("[","").Replace("]","")
      

  6.   

      public static void Main(string[] args)
            {
                string str = "【quote=53583604】吃我【/quote】啊啊 ";
                str = System.Text.RegularExpressions.Regex.Replace(str, "【[^】]+】", "");
                Console.WriteLine(str);
                Console.ReadKey();
            }
      

  7.   

    string sr="别干我别干我【quote=53583604】干掉我【/quote】 剩下我";
    结果:“别干我 剩下我”。要把干掉我也干掉
    楼上的大哥
      

  8.   

     string str = "别干我别干我【quote=53583604】干掉我【/quote】 剩下我";
                str = System.Text.RegularExpressions.Regex.Replace(str, "【.*?】(.*?)】", "");
      

  9.   

    string str = "别干我别干我【quote=53583604】干掉我【/quote】 剩下我";
                str = System.Text.RegularExpressions.Regex.Replace(str, "(?is)(?=【)(?:(?!</?】\b).)*(?<=】)", "");