How to check if a string contains emojis in JavaScript?
Originally Published Here ๐!
To check if a string contains emojis in JavaScript, we can use a regex expression to match a range of Unicode specific to emojis.
TL;DR
// Match almost all emoji
const str = "Hello ๐ ๐";
/(\u00a9|\u00ae|[\u2000-\u3300]...
melvingeorge-me.hashnode.dev2 min read