'How to remove ALL 2019 emoji characters from string using JavaScript?

Yes, I know that this is a duplicate of a few existing questions. I have already fully acknowledged this with references in my original question introduction.

However, in 2019, the list is expanded to include additional set of 230 emojis, which I presume aren't covered in existing answers / ranges.

http://www.unicode.org/Public/emoji/12.0/

I am not exactly familiar nor comfortable constructing unicode ranges for removal, so if anyone knows can you post an updated version?

As per my understanding, the codes are a bit scattered around and cannot be easily defined from start to end in one single continuous range.


The best answer so far updated in 2018 here:

https://stackoverflow.com/a/41543705/2715309

text.replace(/([\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g, '');

As you can see, I also posted a comment about updated list, but the author hasn't updated answer yet.


additional similar questions:

jquery remove all emoji include new

Remove Emoji's from jquery

PHP : writing a simple removeEmoji function



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source