Regex Tester & Debugger
Test regular expressions in real time with live highlighting, match details, capture groups, and replace functionality.
//
Common Patterns
Quick Reference
.Any character (except newline)
\dDigit [0-9]
\wWord char [a-zA-Z0-9_]
\sWhitespace
\bWord boundary
^Start of string/line
$End of string/line
*0 or more
+1 or more
?0 or 1 (optional)
{n,m}Between n and m times
[abc]Character class
[^abc]Negated class
(abc)Capture group
(?:abc)Non-capture group
(?<name>abc)Named group
a|bAlternation (a or b)
(?=abc)Positive lookahead
(?!abc)Negative lookahead
How to Use This Regex Tester
- Type your regular expression pattern in the input field
- Set flags (global, case-insensitive, multiline, etc.)
- Enter or paste your test string below
- Matches are highlighted instantly with full details
- Use the Replace section to test substitutions
Features
- Live Highlighting — Matches are color-coded in your test string as you type
- Match Details Table — See every match with index position and capture groups
- Named Groups — Full support for named capture groups
- Replace Mode — Test regex replacements with backreferences ($1, $2)
- Common Presets — One-click patterns for email, URL, IP, phone, dates, and more
- Quick Reference — Built-in regex cheat sheet
Frequently Asked Questions
Is my data safe?
Yes. Everything runs entirely in your browser. No data is sent to any server.
Which regex flavor does this use?
This tool uses JavaScript's built-in RegExp engine, which supports ES2024 features including named groups, lookbehind assertions, and the dotall flag.
Can I test multiline patterns?
Yes. Enable the Multiline (m) flag to make ^ and $ match at line boundaries instead of string boundaries.