function reviver( key, value ) {
	if ( value && value.type === 'RegExp' && value.pattern ) {
		return new RegExp( value.pattern, value.flags );
	}
	return value;
}
Revives a JSON-serialized regular expression.

@param {string} key - key
@param {*} value - value
@returns {(*|RegExp)} regular expression

@example
var parseJSON = require( '@stdlib/utils/parse-json' );

var str = '{"type":"RegExp","pattern":"ab+c","flags":""}';

var re = parseJSON( str, reviver );
// returns <RegExp>