UTF-16 Surrogate Pair

Regular expression to match a UTF-16 surrogate pair.

Usage

var RE_UTF16_SURROGATE_PAIR = require( '@stdlib/regexp/utf16-surrogate-pair' );

RE_UTF16_SURROGATE_PAIR

Regular expression to match a UTF-16 surrogate pair.

var bool = RE_UTF16_SURROGATE_PAIR.test( 'abc\uD800\uDC00def' );
// returns true

Examples

var RE_UTF16_SURROGATE_PAIR = require( '@stdlib/regexp/utf16-surrogate-pair' );

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

bool = RE_UTF16_SURROGATE_PAIR.test( 'abc\uD800\uDC00def' );
// returns true

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