字符:rrr&nothing=1&nothing=2&nothing=1&page=2
替换成:rrr&page=2

解决方案 »

  1.   


     string str = Regex.Replace("rrr&nothing=1&nothing=2&nothing=1&page=2", "nothing=\\d+&", "");
      

  2.   

    问题是nothing=?这个东西是动态增长的,可能有很多
      

  3.   

    1楼++            String s = "rrr&nothing=1&nothing=2&nothing=1&page=2";
                String ss = Regex.Replace(s, "&nothing=\\d+", "");
                Console.WriteLine(ss);