code: function fixResponder(url, pattern, responder){
    var $v = /\$\d+/g;
    var m;
    var newRx;
    if(!$v.test(responder)){
      return responder;
    }
  
    m = url.match(pattern);
  
    if(!Array.isArray(m)){
      return responder;
    }
  
    for(var i = 0, l = m.length; i < l; i++){
      newRx = new RegExp('\\$' + i, 'g');
      responder = responder.replace(newRx, m[i]);
    }
  
    return responder;
  }
docs: For some responder with regular expression variable like $1, $2,
  it should be replaced with the actual value
  
  @param {Regular Express Object} pattern matched array
  @param {String} responder, replaced string