googlefonts/noto-emoji

Regex similar to Twemoji's

nunoperalta opened this issue · 2 comments

Is there a maintained "regex" that is compatible with your codepoints?
(or a way to generate one)

Something similar to this Twemoji's regex:
https://github.com/twitter/twemoji-parser/blob/master/src/lib/regex.js

I've been using Twemoji's regex to convert plaintext into Noto Emoji PNG, but there isn't support to 14.0 yet.
(and might not contain exactly the same amount of emoji as Noto Emoji)

return String(str).replace(twemojiRegex, function (emoji) {
	var codepoint = emojiToCodePoint(emoji);
	...
	return '<img ...>';
});

One good thing about it also, is that it's well "compressed" (reduces file size).

Thanks! The first one might help yeah - seems to be exactly what I'm looking for!!
Really appreciate that.
Cheers.

This is the Regex-only repo: https://github.com/mathiasbynens/emoji-test-regex-pattern