Regex Playground

Updated: 2026-07-11
Ad Space (Top)

🔍 Regular Expression

📊 Match Results

0 matches

🔄 Replace Test

Click "Replace" to see result

📖 Syntax Reference

Common Metacharacters

. any char · \d digit · \w word char · \s whitespace

Quantifiers

* 0+ · + 1+ · ? 0-1 · {3} exactly 3 · {2,5} 2 to 5

Groups & Assertions

(...) capturing · (?:...) non-capturing · (?=...) lookahead · (?!...) negative lookahead

❓ FAQ

Why no match results?

Check regex syntax. Common issues include unescaped special characters (. * + need \), mismatched brackets, misplaced quantifiers. Start simple and add complexity.

What does the g flag mean?

g (global) enables multiple matches. Without it, only the first match is found. Other flags: i (case-insensitive), m (multiline), s (dotAll), u (unicode).

How to reference capture groups in replacement?

Use $1, $2, $3 for capture groups 1, 2, 3. $& references the full match, $` the text before match, $' the text after match.

Ad Space (Bottom)