Open
Description
const emojiRegex = require('emoji-regex');
const text = `
\u{39}\u20E3\uFE0F
\u{39}\uFE0F\u20E3
`;
const regex = emojiRegex();
for (const match of text.matchAll(regex)) {
const emoji = match[0];
console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`);
}
Output:
Matched sequence 9⃣ — code points: 2
Matched sequence 9️⃣ — code points: 3
U+FE0F
(VS16) reverses the order here, and I'm not sure how the Emoji spec defines this situation.
Metadata
Metadata
Assignees
Labels
No labels