How to use Regex tester
- 1
Enter a pattern
Type the regular expression without slashes; the flags go in the toggles below it.
- 2
Add a test string
Paste the text to search; matches are highlighted and listed with their capture groups as you type.
- 3
Check the explanation
Open Explanation to read each token in plain English and spot what the pattern really does.
- 4
Preview a replacement
Type a replacement using $1 or $<name> to see the result, then copy the code from the Code tab.
Limits and Pro
Free with no sign-up: up to 100,000 matches counted, 2,000 highlighted and 200 listed in the table; highlighting covers test strings up to 200,000 characters, and each run is stopped after 1.5 seconds.
Pro removes the ads; the tester behaves the same on every plan. See Pro
About Regex tester
This tester runs your pattern with the JavaScript (ECMAScript) regular-expression engine built into the browser — the same one used by Node.js, Deno, Bun and every web page — so what matches here matches in your code. Type a pattern and a test string and every match is highlighted as you type, with a table of positions, numbered capture groups and named groups, and the start and end of each group when the d flag is on.
All eight flags can be toggled: g for every match, i to ignore case, m so ^ and $ work per line, s so the dot also matches line breaks, u for full Unicode and \p{…} property escapes, v for Unicode sets with intersection and subtraction inside brackets, y for sticky matching and d for indices. The replace box previews String.prototype.replace with $1, $<name>, $& and the other substitution tokens, and the Code tab gives the matching literal, matchAll and RegExp() snippets.
The explanation tab breaks the pattern into tokens and says in plain English what each one does — groups, lookarounds, character classes, quantifiers and whether they are greedy or lazy — and the cheat sheet inserts common tokens at the cursor.
Matching runs in a background Web Worker with a 1.5-second limit. A pattern that backtracks catastrophically, such as (a+)+b against a long run of a's, is stopped with an explanation instead of freezing the tab. Patterns written for PCRE, Python or .NET may need changes: possessive quantifiers, atomic groups, recursion, \A and \Z don't exist in JavaScript.
Privacy
Patterns and test strings stay in this browser tab: matching happens in a local Web Worker and nothing you type is uploaded, logged or stored, so it is safe to test against real log lines or customer data.
Features
The real JS engine
Matches exactly like RegExp in browsers and Node.js, including v-flag sets and named groups.
Token-by-token explanation
Every group, class, anchor and quantifier described in plain English.
Backtracking protection
Matching runs in a worker with a 1.5-second limit, so a bad pattern can’t freeze the page.