press ⌘K to switch tools
TEXT
Regular Expression Tester
Test and debug regular expressions with live matching.
regex-tester
2 match(es)
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | [email protected] | 9 | — |
| 2 | [email protected] | 31 | — |
§01 ABOUT THIS TOOL
Overview
This tester evaluates a JavaScript regular expression against a test string as
you type. Every match is listed with its matched text, its zero-based index in
the string, and any capture group values — the fastest way to debug a pattern
before it lands in code. Because it uses the browser’s native RegExp, results
match what your JavaScript runtime will actually do.
How to use
- Enter your expression in the Pattern field (no surrounding slashes needed).
- Toggle the flag checkboxes:
g,i,m,s,u,y. - Paste sample input into Test string. The match count and the results table (# / Match / Index / Groups) update live.
Examples
- Pattern
\b\w+@\w+\.\w+\bonContact: [email protected] and [email protected]→ 2 matches:[email protected](index 9),[email protected](index 31). - Pattern
(\d{4})-(\d{2})on2026-07-23→ match2026-07, groups2026, 07.
Notes
Invalid patterns show the engine’s error message instead of results. Matching is capped at 10,000 iterations and the table shows at most the first 200 matches, so pathological patterns cannot hang the page.
FAQ
Is my pattern or test text sent to a server?
No. Matching runs entirely in your browser using the native JavaScript RegExp engine. Neither the pattern nor the test string leaves your device.
Which regex dialect does this use?
The browser's own JavaScript (ECMAScript) engine — the same behavior you get in Node.js or browser code. Syntax from other dialects, such as PCRE-only constructs, may not work identically.
Why do I see all matches even without the g flag?
The tool enumerates every occurrence, so the g flag is added internally when listing matches. The other flags (i, m, s, u, y) behave exactly as you set them.