code: function getRank(indicesArray) {
    var firstElementIndex;
    var groupingScore;
    var tempArray;
  
    if (indicesArray) {
      firstElementIndex = indicesArray[1];
  
      tempArray = indicesArray
        //get all odd indices because they correspond to the capture groups in the regex (see util#getRegex)
        .filter(function(v, i) {
          return i % 2 !== 0;
        })
        //remove last element (corresponds to last capture group in regex i.e., .*)
        .slice(0, -1);
  
      //slicing 1st element from 'ys' to zip adjacent indices together
      groupingScore = util.zip(tempArray, tempArray.slice(1))
        //get distance between adjacent matches
        //and sum em up to get grouping score
        .reduce(function(p, c) {
          return p + (c[1] - c[0]);
        }, 0);
      //make a small number larger so that
      //a large rank means that it should be
      //higher in the list
      //(negative smaller number is greater than negative bigger number son)
      return groupingScore * -1;
    }
    else return -9999999;
  }
docs: /*
  How it works:
  
  Indices array is:
  [31, 35, 36, 41]
  Get distance between adjacent elements
  (35 - 31) + (36 - 35) + (41 - 36) = 10
  4     +     1     +     5     = 10 (this number denotes loose/tight grouping)
  closely grouped matches have a higher rank than
  loosely grouped matches in this scheme
  getRank :: Array -> Int
   
  Gives a rank based on indices of capture
  @param  {Array} indicesArray An array of indices of capture groups
  @return {Int}                The rank of the current list item being ranked