docs: function _extractValues(search) {
    var values = [];
    search.paths.forEach(function(file) {
  
      var map = new Array(search.segments.length), begin = 0, end = 0, finished = false;
  
      // get the values for each path
      var fileSegments = file.split('/');
  
      if (!search.globstars) {
        // easy without globstar
        var obj = {};
        search.segments.forEach(function(segment, i) {
          if (fileSegments.length <= i) return;
          if (segment.type === 'text') return;
          obj[segment.segment] = fileSegments[i];
        });
        values.push(obj);
  
      } else {
        // globstar is a bit trickier
        var hit = false;
        var obj = {};
        var i, j;
        var ss = search.segments;
        var fs = fileSegments;
  
        // forward
        for (i = 0; i < ss.length; i++) {
          var segment = ss[i];
          if (segment.globstar) hit = true;
          if (hit) {
            begin = i;
            break;
          }
          map[i] = i;
        }
  
        // backward (segment and file lenght can be different)
        hit = false;
        for (i = ss.length - 1, j = fs.length - 1; i >= 0 && j >= 0; i--, j--) {
          var segment = ss[i];
          if (segment.globstar) hit = true;
          if (hit) {
            end = j;
            break;
          }
          map[i] = j;
        }
  
        // thing in between -> globstar
        map[begin] = [begin, end];
  
        // FIXME handle multiple globstars
        if (search.globstars && search.globstars > 1) {
          console.error('sorry, multiple globstars segments are not yet supported');
        }
  
        // finish up -> write values
        ss.forEach(function(segment, i) {
          if (segment.type !== 'text') {
            var mapping = map[i];
            if (Array.isArray(mapping)) {
              var g = fs.slice(mapping[0], (mapping[1] + 1)).join('/');
              obj[segment.segment] = g;
            } else {
              obj[segment.segment] = fs[mapping];
            }
          }
        });
        values.push(obj);
      }
  
    });
  
    search.values = values;
  
    return search;
  }