mathiasbynens / emoji-regex

A regular expression to match all Emoji-only symbols as per the Unicode Standard.
https://mths.be/emoji-regex
MIT License
1.73k stars 174 forks source link

some emoji can't match #44

Closed gdutwyg closed 3 years ago

gdutwyg commented 5 years ago

you can try '\u263a'.match(regex) and '\u263a\ufe0f'.match(regex)

result:

'\u263a\ufe0f' can match, but '\u263a' canβ€˜t

Chaptykov commented 5 years ago

I found some emoji not matched with this regexp:

πŸ‘πŸ—£β›‘πŸ•ΆπŸ•·πŸ•ΈπŸ•ŠπŸŒͺπŸŒ₯πŸŒ¦πŸŒ§β›ˆπŸŒ©β›Έβ›·πŸŽ–πŸ΅πŸŽ—πŸŽŸπŸŽπŸπŸ›©πŸ›₯πŸ›³β›±πŸ–πŸπŸœβ›°πŸ”πŸ˜πŸšπŸ—β›©πŸ›€πŸ›£πŸžπŸ–₯πŸ–¨πŸ–±πŸ–²πŸ•ΉπŸ—œ πŸ“½πŸŽžπŸŽ™πŸŽšπŸŽ›β±β²πŸ•―πŸ—‘πŸ›’βš’πŸ› β›β›“πŸ—‘πŸ›‘πŸ•³πŸŒ‘πŸ›ŽπŸ—πŸ›‹πŸ›πŸ–Ό πŸ›πŸ·πŸ—’ πŸ—“πŸ—ƒπŸ—³πŸ—„πŸ—‚πŸ—žπŸ–‡πŸ–ŠπŸ–‹πŸ–ŒπŸ–βΈβ―βΉβΊβ­πŸ‘β€πŸ—¨β™Ÿβ™Ύ

image

Chaptykov commented 5 years ago

@mathiasbynens Could you comment it, please?

mpalmerlee commented 5 years ago

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');

Chaptykov commented 5 years ago

Looks like you are right. I think I should be more attentive. Thank you!

mathiasbynens commented 3 years ago

Closing, since OP meant to use the /text.js regex, and it addresses their problem.