Regex Tester
Test a regular expression against sample text, with live match highlighting and flag toggles.
How to use the Regex Tester
- Enter a regular expression pattern (without the surrounding slashes).
- Toggle flags — global, case-insensitive, multiline, or dot-matches-newline.
- Paste your test text; matches highlight live as you type.
Why use this tool
Regular expressions are notoriously easy to get subtly wrong. Seeing matches highlighted against real sample text — instantly, as you adjust the pattern — makes it much faster to build and debug a regex than testing it inside actual application code.
Frequently Asked Questions
Which regex flavor does this use?
This tool uses your browser's native JavaScript regular expression engine, so syntax and behavior match what you'd get in Node.js or browser JavaScript exactly.
What does the "global" flag do?
Without it, the pattern only matches once. With it enabled, every non-overlapping match in the text is found and highlighted.