Regex Tester
Test regular expressions against sample text.
What is a Regex Tester?
A regular expression is a small pattern language for describing text. Writing one by reasoning alone is slow and error-prone, because the difference between a pattern that works and one that almost works is usually invisible on the page. A tester closes that loop: you see every match, its position and its capture groups the moment you change a character.
This tester uses the JavaScript regex engine — the same one your browser and Node run — so what you see here is what your code will do. Patterns written for PCRE, Python or Go may behave differently in the details, particularly around lookbehind, named groups and Unicode properties.
When you need it
- Validating an input format before shipping the pattern into a form.
- Extracting fields from log lines or semi-structured text.
- Checking that a pattern does not match something it should not.
- Understanding a regex you inherited, by watching what it captures.
- Rehearsing a find-and-replace before running it across a codebase.
How to use the Regex Tester
- Enter your pattern — without the surrounding slashes.
- Toggle the flags you need:
gfor every match,ito ignore case,mfor multi-line anchors,sto let.cross newlines,ufor Unicode. - Paste the text to test against. Matches, their positions and their capture groups appear as you type.
- Optionally enter a replacement —
$1,$2refer to capture groups — and the rewritten text is previewed below. - A malformed pattern reports the engine’s own error rather than silently matching nothing.
Examples
Regex Tester features
Frequently asked questions
Which regex flavour is this?
JavaScript (ECMAScript), the same engine as your browser and Node. Patterns from PCRE, Python or Go usually work, but differ around lookbehind, named groups and Unicode property escapes.
Why does my pattern only match once?
The g flag is off. Without it, the engine stops at the first match. This tester adds g internally when listing matches, so what you see is every match even while the flag is off in your own pattern.
How do I match a literal dot or slash?
Escape it with a backslash: \. matches a dot, \/ a slash. Unescaped, . matches any character except a newline — unless the s flag is on.
My pattern hangs on a long input.
That is catastrophic backtracking, usually caused by nested quantifiers such as (a+)+. Make the inner quantifier more specific, or anchor the pattern so the engine cannot try exponentially many paths.
Should I validate email addresses with a regex?
Only loosely. The real grammar is far more permissive than any readable pattern, so check for an @ with something on both sides and confirm the address by sending a message to it.
Is my data uploaded to a server?
No. Every iZZi DevTools tool runs inside your browser using the standard web platform. The data you paste is processed on your own machine and is never transmitted, stored or logged by us.
Do I need an account?
No. Every core tool is free, unlimited and works without signing in. An account only adds conveniences such as saved snippets and history.
Does it work offline?
Once the page has loaded, yes. Because the processing happens in the browser rather than on a server, the tool keeps working if your connection drops.