EmojiMint
Emoji Picker

DEVELOPER UTILITY

Emoji Regex Generator

Generate practical JavaScript regex patterns for detecting, extracting, or removing emoji. Test matches, copy code, and understand Unicode emoji sequence limitations.

JavaScript SyntaxUnicode Property EscapesUnicode Emoji 17.0 ReferenceNo Account Required

Configure & Generate JavaScript Regex

Select a regex goal to generate practical, copy-ready expressions and usage code.

1. Select Regex Goal
2. Generated Pattern & Usage
Regex Pattern
/(?:\p{Regional_Indicator}{2}|\p{Extended_Pictographic}(?:\uFE0F)?)/gu
Required Flags:
gug = Global matching, u = Unicode-aware property escapes
JavaScript Example
const emojiRegex = /(?:\p{Regional_Indicator}{2}|\p{Extended_Pictographic}(?:\uFE0F)?)/gu;
const matches = text.match(emojiRegex) ?? [];

Test the Regex

Try the generated pattern against sample text before copying it into your project. Tests execute the exact generated pattern.

Test sample:
Results for Goal: Extract Emoji
Matches: 7Unique: 7
Extracted Matches:
๐Ÿš€โœ…โ˜•๐Ÿ‘จ๐Ÿ‘ฉ๐Ÿ‘ง๐Ÿ‘ฆ

Complex emoji sequences can contain modifiers or ZWJ characters. This practical regex may match their components separately.

How the Regex Works

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.

Regex Token Breakdown

Pattern elements & flags
\p{Extended_Pictographic}Property Escape

Covers many pictographic characters used in emoji sequences.

\uFE0FSelector

Optional emoji presentation variation selector (VS16).

\p{Regional_Indicator}{2}Flag Pair

Matches common two-code-point regional indicator country flag pairs.

uRegExp Flag

Unicode-aware parsing flag enabling property escape support.

gRegExp Flag

Global matching flag to collect or replace all occurrences.

Unicode Sequence vs Code Point Examples

Understand why single visual emojis break down into component code points.

๐Ÿ‘ฉโ€๐Ÿ’ป
ZWJ SequenceWoman Technologist
U+1F469 U+200D U+1F4BB

One visible emoji containing 3 code points. Concise property regexes match pictographic components unless sequence rules are applied.

๐Ÿ‡ฎ๐Ÿ‡ณ
Flag SequenceFlag of India
U+1F1EE U+1F1F3

Two regional-indicator code points. Explicitly matched as a pair by \p{Regional_Indicator}{2}.

๐Ÿ‘๐Ÿฝ
Skin Tone ModifierThumbs Up: Medium Skin
U+1F44D U+1F3FD

Base gesture followed by a skin-tone modifier character. Modifier handling depends on pattern design.

1๏ธโƒฃ
Keycap SequenceKeycap Digit One
U+0031 U+FE0F U+20E3

Digit character combined with variation selector 16 and keycap combining symbol. Useful edge case for testing.

Common Uses

Practical integration scenarios for JavaScript applications.

Detect emoji

Check whether user messages, comments, or form inputs contain matched emoji characters.

Extract emoji

Collect all emoji occurrences from chat logs, social posts, or analytics payloads.

Remove emoji

Create a plain text string with matched emoji removed for slug generation or legacy text storage.

Input testing

Test how your application frontend and backend handle emoji-heavy test strings.

Need to inspect detected emoji and remaining text instead?

Our interactive Emoji Validator tool breaks down mixed text into detected emojis, remaining text, and precise Unicode code points.

Emoji Validator โ†’

Examples

Use these small cases to understand the input and confirm the output shape.

CaseInputExpected output
DetectStatus: ready ๐Ÿš€true
ExtractShip it ๐Ÿš€โœ…["๐Ÿš€", "โœ…"]
RemoveClean โœจ copyClean copy
FlagTrip ๐Ÿ‡ฎ๐Ÿ‡ณ["๐Ÿ‡ฎ๐Ÿ‡ณ"]
Complex sequenceCoder ๐Ÿ‘ฉโ€๐Ÿ’ปMatched pictographic components

What This Regex Does Not Guarantee

  • Older JavaScript engines (ECMAScript 2017 and earlier) do not support Unicode property escapes (u flag).
  • Concise property-based patterns are practical helpers, not a complete implementation of the Unicode Emoji 17.0 sequence specification.
  • Complex ZWJ sequences (such as professions or family emojis), skin-tone modifiers, and keycaps can be matched as individual component code points unless sequence-level parsing is implemented.
  • Successful regex matching confirms code point patterns, but does not guarantee the operating system renders a visible emoji glyph.

Move to the next step without losing the context of your current result.

Emoji Regex Generator FAQs

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.