function reFromString( str ) {
	if ( !isString( str ) ) {
		throw new TypeError( format( 'invalid argument. Must provide a regular expression string. Value: `%s`.', str ) );
	}
	// Capture the regular expression pattern and any flags:
	str = reRegExp().exec( str );

	// Create a new regular expression:
	return ( str ) ? new RegExp( str[1], str[2] ) : null;
}
Parses a regular expression string and returns a new regular expression.

@param {string} str - regular expression string
@throws {TypeError} must provide a regular expression string
@returns {(RegExp|null)} regular expression or null

@example
var re = reFromString( '/beep/' );
// returns /beep/