Regex Tester
Test a regular expression against text and see all matches, capture groups and positions live.
How to use it
- Enter a pattern Your regular expression, plus any flags.
- Paste test text The text to search.
- Inspect the matches Each match, its position and capture groups.
Examples
| \d+ | all numbers |
|---|---|
| groups | in brackets |
About this tool
A regular expression is only as good as your confidence that it matches the right things. This tester runs your pattern against sample text live, highlighting every match along with its position and capture groups so you can refine it quickly.
It uses the same engine as JavaScript, so what works here works in your code, and it reports syntax errors as you type rather than failing silently. Everything runs in your browser, so even sensitive text stays private.
Frequently asked questions
Which regex syntax is used?
JavaScript's regular expression engine, so the same patterns work in your browser and Node.js code. Common flags like g, i, m and s are supported.
What do the numbers mean?
Each result shows the match's position in the text and any capture groups in brackets, so you can see exactly what was captured.
Related tools
Updated June 15, 2026