Regex Tester
Write a pattern and watch it match, capture groups and all.
Free, no signup, no limits
Order 4417 shipped 2026-07-31 to ana.ferreira@acme.com Order 4418 shipped 2026-08-02 to bob.mensah@acme.com Order 4419 pending, expected 2026-08-14 Order 4420 shipped 2026-08-15 to carol@other.io
Capture groups
| 19 | year: 20262: 073: 31 |
| 74 | year: 20262: 083: 02 |
| 137 | year: 20262: 083: 14 |
| 167 | year: 20262: 083: 15 |
How to test a regular expression
Type the pattern at the top and paste the text underneath. Matches highlight as you type, and capture groups appear in a list beneath them.
Flags are the four that matter: i for case, m for multiline anchors, s to
let a dot cross newlines, u for Unicode property classes. The global flag is
always on, because a tester that stops at the first match is not telling you
much.
It is the JavaScript engine, not an imitation
The pattern runs in your browser using the browser's own regular expression engine. What you see here is exactly what your JavaScript will do, character for character, including the parts of the specification that surprise people.
That is worth knowing when you plan to use the pattern somewhere else. The flavours differ, mostly around lookbehind, named group syntax and Unicode classes. A pattern that works here works in Node and in every modern browser. It may need adjusting for Python, PCRE or Go.
Capture groups are the point
A tester that only highlights matches tells you whether the pattern fires. The groups tell you whether it fires on the right parts, which is the actual question when you are pulling a date or an ID out of a line.
Named groups are listed by name. (?<year>\d{4}) shows up as year rather
than 1, and once a pattern has five groups that difference is the whole
readability of the thing.
A group that did not participate in the match is shown as none rather than blank, since an empty match and no match are different states and the difference matters when you go to use the value.
Why the input is capped
Because a valid pattern can still lock the page.
Nested quantifiers, (a+)+b being the classic, backtrack exponentially. On a
long string of a's that never reaches a b, the engine explores an astronomical
number of paths before giving up. JavaScript has no way to interrupt a running
regular expression: no timeout, no abort, nothing. The tab stops responding and
the only remedy is closing it.
Nothing here makes that impossible, so the input is capped at 20,000 characters to bound how far a pathological pattern can get. Worth knowing before you paste a whole log file in.
Once the pattern works
Take it to find and replace, which has the same regex mode and shows every replacement highlighted before you copy anything.
If what you were building was a pattern for pulling addresses or links out of text, both already exist: email extractor and URL extractor, each with the edge cases already handled.
Everything runs in your browser. Nothing is uploaded.
Frequently asked questions
More Text tools
Everything else in the Text toolbox.
Something missing here?
If this tool almost does what you need, say what is missing. That is usually how the next version gets built.