Emoji Regexp for Go
This is a port of mathiasbynens/emoji-regex to Go. The RE2 regex is provided by emoji-test-regex-pattern.
This module exports one and only symbol, emojiregexp.EmojiRegexp
, which is a regular *regexp.Regexp
that matches all Unicode emojis, including multi-codepoint ones.
Currently supported Unicode version is 15.1.
Notes
re2.txt
is generated by running ./scripts/update
. Running it again will update it to the latest version provided by emoji-test-regex-pattern
.
full-emoji-list.txt
used in test was generated by running
[...document.querySelectorAll('td.chars')].map(td => td.textContent).join('\n') + '\n'
on https://unicode.org/emoji/charts/full-emoji-list.html.