Answer
According with the Unicode Standard 15.0 docs. (EBNF and Regex):
Emojis Regex Shape
\p{RI} \p{RI}
| \p{Emoji}
( \p{EMod}
| \x{FE0F} \x{20E3}?
| [\x{E0020}-\x{E007E}]+ \x{E007F}
)?
(\x{200D}
( \p{RI} \p{RI}
| \p{Emoji}
( \p{EMod}
| \x{FE0F} \x{20E3}?
| [\x{E0020}-\x{E007E}]+ \x{E007F}
)?
)
)*
Emojis Regex in JavaScript
const emojisRegex = /\p{RI}\p{RI}|\p{Emoji}(\p{EMod}|\uFE0F\u20E3?|[\u{E0020}-\u{E007E}]+\u{E007F})?(\u200D(\p{RI}\p{RI}|\p{Emoji}(\p{EMod}|\uFE0F\u20E3?|[\u{E0020}-\u{E007E}]+\u{E007F})?))*/gu;
Almost the same including flags g
for global and u
for extended unicode escapes.
Keeping #*0123456789ยฉยฎ
Out of the Formula
Characters #*0123456789ยฉยฎ
are the only ones from ASCII and ASCII Supplement that match as emojis. You don't need to worry about the following subsets: CJK Unified Ideographs (Han), Hiragana, Kangxi Radicals, and Katakana; not a single one matches.
In case you need to exclude the ones mentioned before, you could filter them.
// E.g.:
const emojisRegex = /\p{RI}\p{RI}|\p{Emoji}(\p{EMod}|\uFE0F\u20E3?|[\u{E0020}-\u{E007E}]+\u{E007F})?(\u200D(\p{RI}\p{RI}|\p{Emoji}(\p{EMod}|\uFE0F\u20E3?|[\u{E0020}-\u{E007E}]+\u{E007F})?))*/gu;
const input = '#*Aa01ยฉยฎใใใกใขโฟโฟโโ๏ธ3๏ธโฃ๐บ๐พ๐ฉ๐ฟโโค๏ธโ๐จ๐ฟ';
input
.match(emojisRegex)
.filter(emoji => !/^[#*0-9ยฉยฎ]$/.test(emoji));
// ['โ', 'โ๏ธ', '3๏ธโฃ', '๐บ๐พ', '๐ฉ๐ฟโโค๏ธโ๐จ๐ฟ']
Note About the Top Rated Anwer
Regex \p{Emoji}
will not do the job in case you need to identify and isolate each emoji. It matches the smallest portion of emojis, that means, the vast majority of results will look like broken emojis, even the oldest, simplest ones will be modified.
// E.g.:
const vagueRegex = /\p{Emoji}/gu;
const emojisRegex = /\p{RI}\p{RI}|\p{Emoji}(\p{EMod}|\uFE0F\u20E3?|[\u{E0020}-\u{E007E}]+\u{E007F})?(\u200D(\p{RI}\p{RI}|\p{Emoji}(\p{EMod}|\uFE0F\u20E3?|[\u{E0020}-\u{E007E}]+\u{E007F})?))*/gu;
'โโ๏ธ3๏ธโฃ๐บ๐พ๐ฉ๐ฟโโค๏ธโ๐จ๐ฟ'.match(vagueRegex); // ['โ', 'โ', '3', '๐บ', '๐พ', '๐ฉ', '๐ฟ', 'โค', '๐จ', '๐ฟ']
'โโ๏ธ3๏ธโฃ๐บ๐พ๐ฉ๐ฟโโค๏ธโ๐จ๐ฟ'.match(emojisRegex); // ['โ', 'โ๏ธ', '3๏ธโฃ', '๐บ๐พ', '๐ฉ๐ฟโโค๏ธโ๐จ๐ฟ']
/^\p{Emoji}*$/u.test("123")
A fix for that would be this regexp:/(?=\p{Emoji})(?!\p{Number})/u
โ Cahier