Write a regular expression and watch it match as you type. Every match is highlighted in place, listed with its position, and broken out into capture groups — numbered and named — so you can see exactly what each part of the pattern grabbed. All six flags are one click away, invalid patterns show the engine's own error message rather than failing silently, and a replace field previews the result with $1 and $<name> backreferences working as they will in your code. The dialect is JavaScript's native RegExp, because that is what actually runs in your browser and your Node service; testing against a server-side PCRE engine is how you end up with a pattern that works in the tester and breaks in production over a lookbehind. Nothing you paste — log lines, sample data, customer records — leaves your browser.
| Token | Matches |
|---|---|
| \d \w \s | Digit, word character, whitespace (uppercase negates) |
| + * ? | One or more, zero or more, zero or one |
| {2,5} | Between two and five times |
| ^ $ | Start and end of string, or of line with the m flag |
| \b | Word boundary — the fix for matching 'cat' inside 'category' |
| (...) (?:...) | Capturing group, non-capturing group |
| (?<name>...) | Named capture group |
| (?=...) (?!...) | Lookahead: followed by, not followed by |
| +? *? | Lazy — match as few characters as possible |
JavaScript's native RegExp, running in your browser. That is deliberate: if you are writing a pattern for JavaScript or Node, testing it against a PCRE or Python engine can pass here and fail in production, because lookbehind support, Unicode property escapes and named group syntax all differ between engines.
g finds every match rather than the first; i ignores case; m makes ^ and $ match at each line break; s lets the dot match newlines; u enables full Unicode handling including property escapes; y anchors each match to where the last one ended.
The g flag is off. Without it a regex returns the first match and stops. This is the single most common surprise in regex work, and it is also why reusing a /g regex object across calls can skip matches — its lastIndex carries over between calls.
A pattern with nested quantifiers — something like (a+)+$ — that forces the engine through exponentially many backtracking paths on input that nearly matches. It can hang a process. This tool caps matching at 5,000 results or one second so the tab stays usable, but the real lesson is not to ship such a pattern where it sees untrusted input.
Yes. Write (?<name>...) and the group is listed by name alongside the numbered ones, and $<name> works in the replace preview.
No. The pattern and the test string are processed in your browser. Log lines and sample records pasted here are never sent to a server, logged, or stored.
Patterns are compiled with the native RegExp constructor, so the dialect is exactly the JavaScript one your code will run — not a server-side PCRE approximation that differs in lookbehind, Unicode property escapes and named group syntax. A compile failure is caught and the engine's own message is shown rather than a generic error. Matching walks exec in a loop, which needs two guards: a zero-length match leaves lastIndex unmoved, so the loop advances it by hand — without that, a pattern like a* against any input matches the empty string at one position forever — and the loop stops at 5,000 matches or one second of wall clock, whichever comes first, so a pathological pattern cannot lock the tab indefinitely. Highlighting is done by splitting the input into alternating plain and matched segments which React renders as separate nodes, never by building an HTML string, so a test string containing markup cannot inject anything. Replacement preview uses String.replace, so $1, $<name> and $& behave exactly as they will in your own code.