function isRegExp(obj) {
  return Object.prototype.toString.call(obj) === '[object RegExp]';
}
Determines if an object is a `RegExp`
This is used since `instanceof` will not work in virtual contexts

@param {*} obj Object to test
@returns {boolean}