UTF-16 Unpaired Surrogate

Regular expression to match an unpaired UTF-16 surrogate.

Usage

var RE_UTF16_UNPAIRED_SURROGATE = require( '@stdlib/regexp/utf16-unpaired-surrogate' );

RE_UTF16_UNPAIRED_SURROGATE

Regular expression to match an unpaired UTF-16 surrogate.

var bool = RE_UTF16_UNPAIRED_SURROGATE.test( 'abc\uD800def' );
// returns true

Examples

var RE_UTF16_UNPAIRED_SURROGATE = require( '@stdlib/regexp/utf16-unpaired-surrogate' );

var bool = RE_UTF16_UNPAIRED_SURROGATE.test( '\uD800' );
// returns true

bool = RE_UTF16_UNPAIRED_SURROGATE.test( '\uDC00' );
// returns true

bool = RE_UTF16_UNPAIRED_SURROGATE.test( 'abc' );
// returns false