- Emojiguide.com
- FAQ
- Emojis for Developers
- How do I match an emoji with regex?
How do I match an emoji with regex?
Use the Unicode property \p{Emoji} — supported in JavaScript (with the u flag), Python (with the regex module), Ruby and PHP. Example in JS: /\p{Emoji}/gu.test("🎉"). For strict matching including ZWJ sequences, libraries like emoji-regex are the easiest route.