helpers/GruntHelper.js
function getMatches(source, pattern) {
  var matches = [],
      match;

  // Grab all added extensions
  while (match = pattern.exec(source)) {
    matches.push(match[2]);
  }

  return matches;
}
function getMatches(source, pattern) {
  var matches = [],
      match;

  // Grab all added extensions
  while (match = pattern.exec(source)) {
    matches.push(match[2]);
  }

  return matches;
}
function getMatches ( source , pattern ) { var matches = [ ] , match ; // Grab all added extensions while ( match = pattern . exec ( source ) ) { matches . push ( match [ 2 ] ) ; } return matches ; }
Returns a list of pattern matches against the source string
Returns a list of pattern matches against the source string