function filterRegExp(array, regexp) {
  if (size(array).length !== 1) {
    throw new Error('Only one dimensional matrices supported');
  }

  return Array.prototype.filter.call(array, function (entry) {
    return regexp.test(entry);
  });
}
Filter values in a callback given a regular expression
@param {Array} array
@param {RegExp} regexp
@return {Array} Returns the filtered array
@private