Git Product home page Git Product logo

Comments (8)

beaugunderson avatar beaugunderson commented on May 18, 2024

👍 I noticed this as well, there are also ~70 emoji that can have a \uFE0F at the end, it's the emoji variation selector.

from emoji-regex.

beaugunderson avatar beaugunderson commented on May 18, 2024

Or maybe it's at the beginning... Hard to tell when there are adjacent emoji.

from emoji-regex.

beaugunderson avatar beaugunderson commented on May 18, 2024

Sorry, definitely supposed to be at the end: http://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.html

from emoji-regex.

rodrigopolo avatar rodrigopolo commented on May 18, 2024

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.

from emoji-regex.

beaugunderson avatar beaugunderson commented on May 18, 2024

Sorry, I was only replying to my previous comment about \uFE0F appearing at the beginning or end of ~70 other emoji (in the non-keycap emoji it's supposed to be at the end), you are correct that it's supposed to be (and appears in practice) in the middle of the keycap emoji. :)

from emoji-regex.

mathiasbynens avatar mathiasbynens commented on May 18, 2024

#2 (comment)

from emoji-regex.

pettedemon avatar pettedemon commented on May 18, 2024

Hi,
I have a php function to remove the emoji, but how can I add these particular emoji in my function?

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

from emoji-regex.

mathiasbynens avatar mathiasbynens commented on May 18, 2024

@pettedemon Try Stack Overflow.

from emoji-regex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.