// the find
mathiasbynens/emoji-regex
A regular expression to match all Emoji-only symbols as per the Unicode Standard.
A tiny, dependency-free regex for matching emoji sequences per the Unicode Standard, generated at build time from Unicode data rather than hand-maintained. Useful for anyone doing text processing, truncation, or image replacement where you need to know exactly which code points count as an emoji.
The regex is generated programmatically from Unicode's emoji-test data via emoji-test-regex-pattern, so it's not a hand-rolled pattern someone eyeballed and will drift out of sync. Each release is pinned to a specific Unicode version, which matters if you're doing image replacement and need a 1:1 mapping between matched sequences and available assets. Zero runtime dependencies, ESM-only, tiny footprint, and it correctly handles multi-codepoint sequences (ZWJ sequences, skin tone modifiers, textual vs emoji presentation) that naive emoji regexes get wrong.
Determinism is a double-edged sword: pin to an old version and you silently miss every emoji added since, with no warning at runtime. ESM-only exports mean CommonJS consumers on older Node/bundler setups need extra config. The maintainer explicitly points people wanting a lighter, non-deterministic pattern to emoji-regex-xs instead, which means this isn't the right tool if you just want 'good enough' emoji stripping and don't want to think about Unicode versioning. Update workflow requires manually bumping a separate @unicode/unicode-X.0.0 package and rebuilding, so staying current isn't automatic like a rolling dependency would be.