Processed locally — your file never leaves your device
Regex Tester
Test a regular expression against your text as you type, with every match, its position and its capture groups listed.
Matching runs in this tab on your own device — the pattern and the text are never sent anywhere. A pathological pattern can still make the page unresponsive; reloading recovers it.
How it works
- Type your regular expression and pick the flags you want.
- Paste the text to test it against — matches update as you type.
- Read each match's position and capture groups, and optionally preview a replacement.
Frequently asked questions
- Is my pattern or test text sent anywhere?
- No. Matching runs in this tab using your browser's own regular-expression engine. That's the practical difference from most online testers, where both the pattern and the sample text — often a real log line or a real customer record — are sent to a server.
- Which regex dialect does it use?
- JavaScript's, exactly as your browser implements it. Nothing is translated or reinterpreted, so what you see here is what the same pattern will do in your own JavaScript or TypeScript code. Patterns written for PCRE, Python or Go may behave differently.
- Does it support named capture groups?
- Yes. Groups written as (?<name>...) are listed by name alongside the numbered ones — both views, because a named group is also numbered and the two are genuinely different ways to read the same match.
- Why does my results list stop at 1000?
- Matching is capped so a very broad pattern over a large input can't lock up the page building a list nobody will read. When the cap is reached the count is shown with a plus sign, so it's never mistaken for the true total.
- Can a regular expression freeze the page?
- Yes, and it's worth knowing. Certain patterns — typically nested quantifiers such as (a+)+ against a long non-matching string — take exponential time, and a running match can't be interrupted. Reloading the page recovers it; nothing is lost, since nothing was saved anywhere.
- Can I preview a replacement?
- Yes. Turn on the replacement preview and use $1, $& or $<name> — the same substitution syntax String.replace uses, so the preview matches what your code would produce.