Regex Tester
Test JavaScript regular expressions with live match highlighting, flag toggles, and capture group inspection.
//g
4 matches
The quick brown fox jumps over the lazy dog. Regex is really useful for matching patterns.
Frequently Asked Questions
What does the 'g' flag do in regex?
The global (g) flag finds all matches in a string, not just the first. Without it, exec() and match() return only the first match.
What are capture groups in regex?
Capture groups are parts of the pattern enclosed in parentheses (). They capture the matched substring so you can extract or reference it. For example, (\d{4}) captures a 4-digit number.
What does the 'i' flag do?
The case-insensitive (i) flag makes the regex match regardless of letter case. For example, /hello/i matches 'hello', 'Hello', and 'HELLO'.