Regex Tester
Test and debug regular expressions with live match highlighting.
//
Matches (4)
Hello World 123 foo bar
| # | Match | Index | Length |
|---|---|---|---|
| 1 | ello | 1 | 4 |
| 2 | orld | 7 | 4 |
| 3 | foo | 16 | 3 |
| 4 | bar | 20 | 3 |
Test and debug regular expressions with live match highlighting. Inspect capture groups, test replacements and get started quickly with built-in presets for common patterns.
Key Features
Live Highlighting
All matches are highlighted in the test string in real time as you type your pattern.
Flag Controls
Toggle g, i, m, s, u flags individually to control matching behavior.
Match Details
See every match with its index and length in a structured table.
Replace Mode
Test replacements strings live, with support for $1, $2 group references.
Built-in Presets
One-click patterns for email, URL, phone, date, IPv4 and hex colors.
How to Use
- 1Enter your regex pattern in the pattern field.
- 2Toggle flags as needed — g for global, i for case-insensitive, etc.
- 3Type your test string — matches are highlighted instantly.
- 4Switch to Replace tab to test substitutions.