Regex Tester — Test Regular Expressions Online Free
Test and debug regular expressions in real time. Match highlighting, capture groups, common patterns.
🔒 Your file never leaves your browser. All regex testing runs locally.
Match preview (2 matches)
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | hello@example.com | 14 | — |
| 2 | support@want2convert.com | 35 | — |
How to Test Regular Expressions Online
- 1
Enter your pattern
Type your regular expression in the Pattern field. Do not include forward slashes — just the pattern itself.
- 2
Set flags and test string
Choose flags (g, i, m, s) and paste your test string into the text area.
- 3
Review matches
Matches are highlighted in the test string. The match list below shows each match with its position and capture groups.
Regular expressions are famously write-only: easy to produce, hard to read back, and harder still to trust without evidence. A live tester turns regex writing from guesswork into feedback — you see every match, every capture group, and every near-miss against your real data as you type, instead of discovering the edge case in production.
This tester uses JavaScript's engine — the same RegExp implementation that will run your pattern in Node.js or the browser. That matters because regex dialects genuinely differ: lookbehind support, Unicode property escapes like \p{L}, and named groups vary across PCRE, Python, and Java. Testing in the engine you deploy on eliminates a whole class of "works in the tester, fails in code" surprises.
Reading your results: capture groups are the part most people fight with. Each match row shows numbered groups in order and named groups ((?<name>…)) by name, so you can confirm you are extracting the right substring rather than just matching the right region. The flag toggles cover the usual suspects — g for all matches, i for case-insensitivity,m for per-line anchors, s for dot-matches-newline.
Start from a pattern, not from scratch:the built-in library (email, URL, IP address, dates, hex colours) gives you a working baseline to adapt. And when your pattern's job is validating or extracting structured text, check whether a dedicated tool fits better — the JSON formatter or diff checker often replaces a fragile regex entirely.