Regex Tester & Debugger
Test regular expressions with live matching and highlighting. Free, no signup required — runs entirely in your browser.
Common patterns:
Frequently Asked Questions
What is a regular expression?▼
A regular expression (regex) is a sequence of characters that defines a search pattern. It is used for pattern matching in strings — finding, replacing, or validating text. Regex is supported in virtually all programming languages.
What do the regex flags mean?▼
g (Global) finds all matches instead of just the first. i (Case Insensitive) ignores upper/lowercase differences. m (Multiline) makes ^ and $ match line starts/ends, not just string starts/ends. s (Dotall) makes . match newline characters too.
How do capture groups work?▼
Capture groups are created with parentheses (). They extract specific parts of a match. Named groups use (?<name>...) syntax. For example, (?<year>\d{4})-(?<month>\d{2}) would capture year and month separately from a date string.
What are common regex mistakes?▼
Common mistakes include: forgetting to escape special characters (., *, +, ?, [, ], etc.), not using the global flag when you want all matches, greedy vs. lazy matching confusion (use .*? instead of .* for lazy), and backtracking issues with nested quantifiers.
Is my data safe in this tool?▼
Yes. All regex testing happens entirely in your browser. No data is sent to any server. The tool uses JavaScript's native RegExp engine.