Updated: 2026-07-11
π 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.