function isRegExp(variable) {
  return Object.prototype.toString.call(variable) === '[object RegExp]';
}
Check if given variable is a regular expression.

@param {*} variable Variable to check.
@returns {Boolean}