function reEOL( options ) {
	var opts;
	var err;
	if ( arguments.length > 0 ) {
		opts = {};
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
		if ( opts.capture ) {
			return new RegExp( '('+REGEXP_STRING+')', opts.flags );
		}
		return new RegExp( REGEXP_STRING, opts.flags );
	}
	return /\r?\n/;
}
Returns a regular expression to match a newline character sequence.

@param {Options} [options] - function options
@param {string} [options.flags=''] - regular expression flags
@param {boolean} [options.capture=false] - boolean indicating whether to create a capture group for the match
@throws {TypeError} options argument must be an object
@throws {TypeError} must provide valid options
@returns {RegExp} regular expression

@example
var RE_EOL = reEOL();
var bool = RE_EOL.test( '\r\n' );
// returns true

@example
var replace = require( '@stdlib/string/replace' );

var RE_EOL = reEOL({
    'flags': 'g'
});
var str = '1\n2\n3';
var out = replace( str, RE_EOL, '' );