Test and debug regular expressions with real-time match highlighting. Runs entirely in your browser.
Try it
How it works
The tool uses the browser’s native RegExp engine — the same one that runs in Node.js:
const re = new RegExp(pattern, flags);
const matches = [...text.matchAll(re)];
Each match is wrapped in a <mark> tag for highlighting. That’s it — no libraries, no server.
Quick regex cheat sheet
| Pattern | Matches | Example |
|---|---|---|
\d+ | One or more digits | 123, 42 |
\w+ | Word characters | hello, foo_bar |
[a-z]+ | Lowercase letters | abc, hello |
^.+$ | Entire line (with m flag) | Any non-empty line |
\b\w{4}\b | Exactly 4-letter words | this, that |
https?://\S+ | URLs | https://example.com |
[\w.]+@[\w.]+ | Simple email pattern | user@example.com |