Closed gdutwyg closed 3 years ago
I found some emoji not matched with this regexp:
ππ£βπΆπ·πΈππͺπ₯π¦π§βπ©βΈβ·ππ΅πππππ©π₯π³β±πππβ°ππππβ©π€π£ππ₯π¨π±π²πΉπ π½ππππβ±β²π―ππ’βπ ββπ‘π‘π³π‘πππππΌ ππ·π πππ³ππππππππβΈβ―βΉβΊβπβπ¨ββΎ
@mathiasbynens Could you comment it, please?
I believe what you want is the text version of the regex that doesn't require the variation selector (U+FE0F)
e.g.:
const emojiRegex = require('emoji-regex/text.js');
Looks like you are right. I think I should be more attentive. Thank you!
Closing, since OP meant to use the /text.js
regex, and it addresses their problem.
you can try
'\u263a'.match(regex)
and'\u263a\ufe0f'.match(regex)
result:
'\u263a\ufe0f'
can match, but'\u263a'
canβt