Regex testertest regular expressions as you type
Matches light up in your text, capture groups are listed one by one, and every token of the pattern is read back to you in plain English. It runs in your browser — nothing is uploaded.
How to test a regex here
- Type the pattern between the slashes — no need to escape forward slashes. The ruler under it colours each token, so a stray bracket shows up at once.
- Pick flags.
gfinds every match,iignores case,mmakes^and$work per line,slets.cross newlines. - Paste real input in the test string — log lines, a CSV column, a list of emails. Matches alternate yellow and blue so neighbours stay distinguishable.
- Read the breakdown. If the plain-English reading doesn't say what you meant, the pattern doesn't either.
- Replace to preview
String.replaceoutput with$1or$<name>, then copy the JavaScript or Python snippet.
Stuck on where to start? Describe the text in English on the AI regex generator, stack blocks in the visual builder, or copy a tested pattern from the pattern library.
Three mistakes this tester catches
Greedy dot-star eating too much
<.*> against <b>bold</b> matches the whole string, because .* grabs as much as it can and only gives back enough for the final >. Use the lazy <.*?> or, better, <[^>]*>. Step through it to see why.
Forgetting anchors when validating
\d{5} "validates" a ZIP code but also matches inside abc123456. For whole-input validation wrap it: ^\d{5}$.
An unescaped dot
example.com also matches exampleXcom. Escape literal dots: example\.com.
Questions
Which regex flavor does this tester use?
Your browser's JavaScript (ECMAScript) engine, the same one Node.js and Deno use. Most syntax — classes, quantifiers, groups, lookahead, lookbehind, named groups, Unicode property escapes with the u flag — works identically in Python, PCRE, Java and .NET. The "Use it in code" panel converts named groups to Python's (?P<name>…) form for you.
Is my test text uploaded anywhere?
No. Matching runs in a Web Worker inside your browser tab. Nothing is sent to a server unless you press "Explain in depth with AI", which sends the pattern and the first 400 characters of your test string to the model.
Why does the tester say my pattern was stopped?
Each run gets 1.5 seconds. Patterns with nested quantifiers such as (a+)+ or (.*)* can take exponential time on inputs that almost match — this is called catastrophic backtracking. Rewrite the nested repetition so each character can only be matched one way.
Why do I only see one match?
Without the g (global) flag, JavaScript stops at the first match. Toggle g on to see all of them.
How do I share a pattern with a teammate?
Press "Copy share link". The pattern, flags and up to 1,500 characters of test text are encoded in the URL fragment (after #), which browsers never send to the server.
What do the coloured bars under the pattern mean?
They are a ruler for your pattern: each token gets a bar — yellow for character classes and escapes, blue for groups, pink for quantifiers, green for anchors, magenta for alternation, red for errors. Hover a line in "What the pattern says" to find it on the ruler.