\p{Extended_Pictographic}Property EscapeCovers many pictographic characters used in emoji sequences.
DEVELOPER UTILITY
Generate practical JavaScript regex patterns for detecting, extracting, or removing emoji. Test matches, copy code, and understand Unicode emoji sequence limitations.
Select a regex goal to generate practical, copy-ready expressions and usage code.
/(?:\p{Regional_Indicator}{2}|\p{Extended_Pictographic}(?:\uFE0F)?)/gugug = Global matching, u = Unicode-aware property escapesconst emojiRegex = /(?:\p{Regional_Indicator}{2}|\p{Extended_Pictographic}(?:\uFE0F)?)/gu;
const matches = text.match(emojiRegex) ?? [];Try the generated pattern against sample text before copying it into your project. Tests execute the exact generated pattern.
Complex emoji sequences can contain modifiers or ZWJ characters. This practical regex may match their components separately.
Choose the job your pattern needs to do, then copy the regex expression and JavaScript code snippet with appropriate Unicode and global flags. Patterns use JavaScript Unicode property escapes for fast, practical validation.
The patterns rely on JavaScript Unicode property escapes. \p{Extended_Pictographic} covers many pictographic characters used in emoji sequences, while \p{Regional_Indicator}{2} pairs two regional indicator code points to match country flags. Variation selectors (\uFE0F), skin-tone modifiers, and zero-width joiners (ZWJ) create multi-code-point sequences that require specific regex design choices.
\p{Extended_Pictographic}Property EscapeCovers many pictographic characters used in emoji sequences.
\uFE0FSelectorOptional emoji presentation variation selector (VS16).
\p{Regional_Indicator}{2}Flag PairMatches common two-code-point regional indicator country flag pairs.
uRegExp FlagUnicode-aware parsing flag enabling property escape support.
gRegExp FlagGlobal matching flag to collect or replace all occurrences.
Understand why single visual emojis break down into component code points.
U+1F469 U+200D U+1F4BBOne visible emoji containing 3 code points. Concise property regexes match pictographic components unless sequence rules are applied.
U+1F1EE U+1F1F3Two regional-indicator code points. Explicitly matched as a pair by \p{Regional_Indicator}{2}.
U+1F44D U+1F3FDBase gesture followed by a skin-tone modifier character. Modifier handling depends on pattern design.
U+0031 U+FE0F U+20E3Digit character combined with variation selector 16 and keycap combining symbol. Useful edge case for testing.
Practical integration scenarios for JavaScript applications.
Check whether user messages, comments, or form inputs contain matched emoji characters.
Collect all emoji occurrences from chat logs, social posts, or analytics payloads.
Create a plain text string with matched emoji removed for slug generation or legacy text storage.
Test how your application frontend and backend handle emoji-heavy test strings.
Our interactive Emoji Validator tool breaks down mixed text into detected emojis, remaining text, and precise Unicode code points.
Use these small cases to understand the input and confirm the output shape.
| Case | Input | Expected output |
|---|---|---|
| Detect | Status: ready ๐ | true |
| Extract | Ship it ๐โ
| ["๐", "โ
"] |
| Remove | Clean โจ copy | Clean copy |
| Flag | Trip ๐ฎ๐ณ | ["๐ฎ๐ณ"] |
| Complex sequence | Coder ๐ฉโ๐ป | Matched pictographic components |
Clear answers
Common questions about JavaScript regex matching and Unicode support.
Use the u flag for Unicode-aware property escapes (\p{...}). Add the g flag when you need all matches in a string rather than stopping at the first occurrence.
No concise JavaScript regex should be presented as a complete replacement for the Unicode emoji-sequence specification. These patterns provide practical, fast matching for common pictographs and flags.
The pattern matches pictographic symbols and skin-tone modifiers as pictographic characters. Depending on the sequence, modifiers may match alongside or as separate components.
Zero-Width Joiner (ZWJ) sequences join multiple code points with U+200D. A concise property regex matches the pictographic components; full sequence grouping requires grapheme segmentation or an extended parser.
A single visual emoji (like ๐จโ๐ฉโ๐งโ๐ฆ or 1๏ธโฃ) can contain 3 to 7 separate Unicode code points. Concise regex patterns match the individual pictographic components unless sequence-level rules are built into the pattern.
Yes. The pattern includes \p{Regional_Indicator}{2}, which matches pairs of regional indicator code points that form country flags (such as ๐ฎ๐ณ or ๐บ๐ธ).
The output uses JavaScript regular expression syntax. Other programming languages use different Unicode property syntax and regex engines, so verify and test the pattern for your specific environment.