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

@param value the value to check
@return true if the value is a regular expression