Regex tester
Live regex matching, entirely in your browser.
Add a file and run the tool.
Your file is ready.
Try a different file, or try again.
Settings
Adjust the settings below. The result updates as you go.
Runs fully in your browser. Nothing is uploaded.
Runs fully in your browser. Nothing is uploaded.
How it works
Type a pattern.
Paste sample text.
See matches highlighted live.
Frequently asked questions
No. Your pattern and text are matched entirely in your browser.
JavaScript's own RegExp engine, since that's what runs in your browser.
The tool detects it and stops after one second, with a clear message, instead of freezing the page. A small number of patterns can take exponentially long against certain text (called catastrophic backtracking) - this tool catches that case rather than hanging.
Not token by token. It shows exactly what matched in your own text and what each capture group caught, which is usually more useful than a generic syntax explanation.
Guides
A closer look at specific problems this tool solves.
Why a Regex Pattern That Works on Your Test Case Still Fails
Testing a regex against the one example you wrote it for tells you almost nothing about how it behaves against the messy, varied real text it will actually meet in production.
Read the guideHow to Test a Regex Pattern Against Real Text Before You Ship It
Type a pattern, paste real sample text, and every match highlights live with a full breakdown of captured groups. Here's the actual process, including what an invalid pattern and a stuck one each look like.
Read the guideCatastrophic Backtracking: Why Some Regex Patterns Freeze the Page
A pattern that works fine against every input you tried it on can still hang a page against the right (or wrong) real-world string. Here's why that happens and what this tool does to stop it.
Read the guide
Comments