replacing [SOLVED]

replacing [SOLVED]

Hello,

I'm using this function:

   
var date='something';
$('#statisticstype a').attr('href', $(this).attr('href').replace(/#statistics\/([^<]+)\/([^<]+)/,'#statistics/'+date+'/$2'));
   


      <div id="statisticstype">
         Additional options:
         <a href="#statistics/all/type:all">All</a> -
         <a href="#statistics/all/type:songs">Only songs</a> -
         <a href="#statistics/all/type:albums">Only albums</a>
      </div>


now what I want is to replace only the middle part of link and it works, but the type:all,type:songs,type:albums changes also to type:all for all 3 links and I don't know why..