Closed fritx closed 1 year ago
How is this "simpler"? You're replacing a carefully-at-build-time-generated regular expression pattern that can easily be updated to newer Unicode/Emoji standards with a hardcoded pattern that offers little explanation as to how or why it works.
From looking at the pattern, it seems to match not only RGI_Emoji
(hence it passing all the tests) but also emoji sequences that are not yet standardized nor supported anywhere. If this is what you want, then emoji-regex
is not the package for you. OTOH, if you want to match exactly all emoji per the latest Unicode standard and nothing else, then stick to emoji-regex
.
Thanks so much for your explanation.
Sorry about missing those important contexts of this library.
It is standard oriented while the simpler one is a loose and hacky version.
No worries. I could imagine use cases for either approach. In the future we'll be able to use /\p{RGI_Emoji}/v
:)
This much simple emoji regex is modified from:
How to detect emoji using javascript https://stackoverflow.com/questions/18862256/how-to-detect-emoji-using-javascript
And is being used here in silent
All tests can pass with this regex