Regex → tester
Type a pattern and every match lights up as you type — with each capture group listed, the replacement previewed, the pattern explained token by token, and the code ready to paste into JavaScript, Python, C# or Java.
- Engine
- JavaScript (ECMAScript)
- Shows
- matches · groups · replace
- Safe
- runaway patterns are stopped
Pattern & text
Matches
Your pattern, explained
Regex cheat sheet
s to include newlines)u)m)$1 in a replacement$<name>Worth knowing
This is the JavaScript engine
Patterns run on your browser's own regex engine, so what matches here is exactly what matches in JavaScript and TypeScript. Python, C# and Java agree on almost everything shown on this page; the Code view adjusts the escaping for each.
Without g, only the first match counts
That is how exec and replace behave without the global flag,
so the tester behaves the same way. Turn g off when you want to see what a
single match() call would return.
Runaway patterns are stopped
Nested quantifiers like (a+)+$ can take exponential time on the wrong
input. Matching runs in a background worker with a time limit, so a pattern like that
is reported instead of freezing the page.
Nothing is uploaded
Your pattern and text stay in this tab. A share link carries them in the part of the
URL after #, which browsers never send to a server.