Emoji (Unicode)
Match emoji characters across the main Unicode emoji ranges — requires the Unicode flag in JavaScript.
Try it in RegexPro →Available in
JavaScript / ECMAScript code
const re = new RegExp("[\\u{1F300}-\\u{1F9FF}\\u{2600}-\\u{26FF}\\u{2700}-\\u{27BF}\\u{FE00}-\\u{FEFF}\\u{1F000}-\\u{1F02F}\\u{1FA00}-\\u{1FA9F}]", "gu");
const input = "Hello 🌍 World 🎉";
const matches = [...input.matchAll(re)];
console.log(matches.map(m => m[0]));Uses `String.prototype.matchAll` for global iteration (Node 12+ / all modern browsers).
Python (re) code
import re
pattern = re.compile(r"[\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{FE00}-\u{FEFF}\u{1F000}-\u{1F02F}\u{1FA00}-\u{1FA9F}]")
input_text = "Hello 🌍 World 🎉"
for m in pattern.finditer(input_text):
print(m.group(0))Stdlib `re` module — no third-party dependency. Works on Python 3.6+.
Go (RE2) code
package main
import (
"fmt"
"regexp"
)
func main() {
re := regexp.MustCompile(`[\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{FE00}-\u{FEFF}\u{1F000}-\u{1F02F}\u{1FA00}-\u{1FA9F}]`)
input := `Hello 🌍 World 🎉`
for _, match := range re.FindAllString(input, -1) {
fmt.Println(match)
}
}Uses `regexp.MustCompile` (panics on bad patterns at startup) and `FindAllString` for all matches.
Pattern
[\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{FE00}-\u{FEFF}\u{1F000}-\u{1F02F}\u{1FA00}-\u{1FA9F}] (flags: gu)Raw source: [\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{FE00}-\u{FEFF}\u{1F000}-\u{1F02F}\u{1FA00}-\u{1FA9F}]
How it works
Examples
Input
Hello 🌍 World 🎉Matches
🌍🎉
Input
⚡ Fast ☁ Cloud ⭐ StarMatches
⚡☁⭐
Input
plain text onlyNo match
—Common use cases
- •Stripping or counting emoji in user-generated content
- •Sentiment analysis preprocessing
- •Content moderation filtering
- •Internationalized text rendering pipelines
Related patterns
Hashtag
Text ProcessingMatch hashtags (# followed by word characters) in social media posts, including accented Latin characters.
Base64 String
Text ProcessingMatch Base64-encoded strings, including proper padding with = and == characters.
C-Style Block Comment
Text ProcessingMatch C-style /* ... */ block comments across multiple lines.
JavaScript Template Literal Placeholder
Text ProcessingMatch `${expression}` placeholders inside JavaScript template literals.