emoji-regex
emoji-regex offers a regular expression to match all emoji symbols (including textual representations of emoji) as per the Unicode Standard.
This repository contains a script that generates this regular expression based on the data from Unicode Technical Report #51. Because of this, the regular expression can easily be updated whenever new emoji are added to the Unicode standard.
Installation
Via npm:
In Node.js:
Console output:
To match emoji in their textual representation as well (i.e. emoji that are not Emoji_Presentation
symbols and that aren’t forced to render as emoji by a variation selector), require
the other regex:
Additionally, in environments which support ES2015 Unicode escapes, you may require
ES2015-style versions of the regexes:
Author
License
emoji-regex is available under the MIT license.
Last updated