Closed titoBouzout closed 3 years ago
That's because you're explicitly using the /text.js
version of the regular expression. /text.js
is supposed to match emoji in their text representation, as defined by the Unicode Standard, so this is working as intended. It sounds like you don't want to use /text.js
— consider using one of the other regular expression flavors instead.
This regexp is not useful when you want to match just emojis... because then you have a 0 and this library will think "oh yeah 0 could be an emoji as 0️⃣" but thats not what I was expecting.
if regexp '0' return false
if regexp '0️⃣' return true