Test JavaScript regular expressions live with highlighted matches | 100% Private
Matches update instantly (debounced) as you edit the pattern, flags, or test string.
Every match is visually highlighted directly inside your test string for instant feedback.
See each match's index and every numbered capture group broken out clearly.
Invalid regex syntax shows a clear message instead of crashing or blanking the page.
One-click examples for email, URL, phone number, and date formats to get you going fast.
All matching runs locally in your browser — nothing is ever sent anywhere.
Regular expressions are powerful but notoriously easy to get subtly wrong. This tester lets you see exactly what your pattern matches against real text, in real time, using the same JavaScript RegExp engine that runs in browsers and Node.js — so what you see here is exactly what you'll get in your code.
The g (global) flag finds every match in the string instead of stopping at the first one. i makes matching case-insensitive. m (multiline) changes ^ and $ to match the start and end of each line. s (dotall) lets the dot (.) match newline characters too, which it normally does not.
Parentheses in a pattern, like (\d{4})-(\d{2})-(\d{2}), create numbered capture groups. Each match below lists its full matched text plus every group it captured, so you can quickly confirm your grouping logic extracts exactly the pieces you expect.
This tool uses your browser's native JavaScript RegExp engine, so the syntax and behavior exactly match what you'd get running new RegExp() in Node.js or in-browser JavaScript.
No. Matching happens entirely in your browser using JavaScript's built-in RegExp object. Nothing you type is ever transmitted, logged, or stored anywhere.
g (global) finds all matches instead of just the first. i makes matching case-insensitive. m (multiline) makes ^ and $ match the start and end of each line rather than the whole string. s (dotall) makes . also match newline characters.
The tool catches the syntax error safely and shows a clear inline error message describing what's wrong, without crashing the page or leaving it blank.
Yes. Every match is listed below the test string along with its index and any numbered capture groups it contains, so you can verify your grouping logic at a glance.