-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to match emoji keycap numbers 0-9, # and * #3
Comments
👍 I noticed this as well, there are also ~70 emoji that can have a |
Or maybe it's at the beginning... Hard to tell when there are adjacent emoji. |
Sorry, definitely supposed to be at the end: http://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.html |
One thing is "supposed" and other is "in practice", Apple, Google and Microsoft implement Emojis very differently, that's why after a long process I decided to create a regex using all emojis typed from the vendor devices (removing any duplicate) then sorting them by length, the big one first for replacement, then if a match is found I strip all the extra emoji characters that don't do something relevant, like the variant selector and the other that glues together emojis, in this way I can find any emoji and find their unicode representation easily. |
Sorry, I was only replying to my previous comment about |
Hi, function remove_emoji($text){
return preg_replace('/([0-9|#][\x{20E3}])|[\x{00ae}|\x{00a9}|\x{203C}|\x{2047}|\x{2048}|\x{2049}|\x{3030}|\x{303D}|\x{2139}|\x{2122}|\x{3297}|\x{3299}][\x{FE00}-\x{FEFF}]?|[\x{2190}-\x{21FF}][\x{FE00}-\x{FEFF}]?|[\x{2300}-\x{23FF}][\x{FE00}-\x{FEFF}]?|[\x{2460}-\x{24FF}][\x{FE00}-\x{FEFF}]?|[\x{25A0}-\x{25FF}][\x{FE00}-\x{FEFF}]?|[\x{2600}-\x{27BF}][\x{FE00}-\x{FEFF}]?|[\x{2900}-\x{297F}][\x{FE00}-\x{FEFF}]?|[\x{2B00}-\x{2BF0}][\x{FE00}-\x{FEFF}]?|[\x{1F000}-\x{1F6FF}][\x{FE00}-\x{FEFF}]?/u', '', $text);
} |
@pettedemon Try Stack Overflow. |
I tested, all emojis available on iOS 9.1 / OS X 10.11.1 and it is failing to detect emoji numbers:
As typed
The text was updated successfully, but these errors were encountered: