Regex Tester
Write a pattern, paste some text, and see exactly what matches — highlighted in place, listed with its position, and broken down by capture group. Numbered groups and named (?<name>...) groups both appear in the table, including the ones that did not participate in a match, so the numbering never surprises you later. Flags are checkboxes rather than something to remember, and switching one re-runs the match immediately. Turn on the replace preview to see what the string becomes, with $1-style back-references working as they do in String.replace. The engine is your own browser's, so what you see here is precisely what the same pattern will do in your JavaScript — no dialect translation, no server round trip, and no copy of your test data anywhere but this tab.
Matched in your browser. Up to 100,000 characters.
3 matches.
Matches
Contact ada@example.com or alan@example.org before Friday. Escalate to ops@example.net after that.
| # | Index | Match | Groups |
|---|---|---|---|
| 1 | 8 | ada@example.com |
|
| 2 | 27 | alan@example.org |
|
| 3 | 71 | ops@example.net |
|
How to use the regex tester
- Type your pattern into the expression field — no surrounding slashes needed.
- Tick the flags you want: global, ignore case, multiline, dot matches newline, unicode, or sticky.
- Paste the text to test against and watch the matches highlight as you type.
- Read the table for each match's position and capture groups, and turn on the replace preview to try a substitution.
Frequently asked questions
- Which regex flavour is this?
- JavaScript's, because the matching is done by your browser's own RegExp engine. Most patterns are portable, but a few things differ from PCRE: there are no possessive quantifiers or atomic groups, and recursion is not supported.
- Why do I only get one match?
- The global flag is off. Without it a regular expression stops at the first match — that is how RegExp behaves everywhere, not a limit of this page. Tick 'g' to find them all.
- What do the capture group numbers mean?
- Groups are numbered by the position of their opening parenthesis, left to right, which is what $1, $2 and so on refer to in a replacement. Non-capturing groups and lookarounds do not take a number. A group that is inside an alternative branch that did not run is shown as not participating rather than being renumbered.
- Is there a limit on the text I can test?
- The test string is capped at 100,000 characters, and matching stops after 1,000 matches. Once a regular expression starts running, JavaScript cannot interrupt it — so a pattern that backtracks catastrophically would freeze the tab, and bounding the input is the practical defence.
- Is my pattern or test data uploaded?
- No. Everything runs in your browser. Nothing is sent to a server, logged, or saved, which makes this safe for testing patterns against real log lines or production data.
Related tools
JSON Formatter and Validator
Format, validate, beautify, or minify JSON online. Paste JSON and get clean, readable output instantly. Runs entirely in your browser.
XML Formatter
Format, beautify, or minify XML online. Paste XML and get clean, indented output instantly. Runs entirely in your browser.
Markdown Preview
Write markdown and see the rendered result beside it, with tables and task lists. Copy the HTML. Runs in your browser, nothing is uploaded.