Regular Expression Tester
Test a JavaScript regular expression against your text and see every match, capture group and named group.
Input
| # | Match | Index | Groups |
|---|---|---|---|
| 1 | contact@onuel.dev | 0 | contact · onuel.dev |
| 2 | support@example.com | 22 | support · example.com |
Testing a pattern against real text
Every match is listed with its position, its capture groups and any named groups, so you can see exactly what a pattern is picking up rather than whether it merely matched.
The flags are the JavaScript ones: g for every match, i for case-insensitive, m to make ^ and $ match line boundaries, s to let . match newlines, u for full Unicode support.
Frequently asked questions
Which regex dialect is this?
JavaScript (ECMAScript). Patterns written for PCRE, Python or Go mostly transfer, but lookbehind support and some escapes differ.
Why does my pattern with .* run slowly?
Nested quantifiers over the same text cause catastrophic backtracking. Matching is capped here to keep the page responsive, but the same pattern would hang a server.
Related tools
Text Compare (Diff)Compare two blocks of text line by line and see exactly what was added, removed or left alone.Sort, Dedupe & Reverse LinesSort lines alphabetically or naturally, remove duplicates, trim whitespace and drop empty lines in one pass.Word & Character CounterCount characters, words, sentences and paragraphs — counting CJK characters correctly rather than treating a whole sentence as one word.URL Slug GeneratorTurn a title into a clean URL slug, either transliterating accents to ASCII or keeping the original script.Syntax HighlighterHighlight a snippet of JavaScript, TypeScript, JSON, CSS, HTML, SQL, Python or shell, and copy it as HTML.ROT13 & Caesar CipherRotate letters by any shift. ROT13 is its own inverse, so one button both hides and reveals.