Regex tester and explainer
InspectExperimentalLimited support. Verify anything critical.
A regular-expression tester evaluates a pattern against sample text and reports each match, its position, and captured groups. This implementation runs the expression inside a dedicated browser Worker with a hard cancellation deadline, so an expensive pattern cannot indefinitely freeze the interface. A compact explainer identifies common anchors, character classes, groups, and repetition tokens without pretending to provide a formal proof of what every possible JavaScript expression means.
Skip to the toolThis tool processes the values or files you choose on your device. They are not uploaded.
Output
Limits
- Patterns are limited to 500 characters
- samples to 100000 characters
- and execution to 250 ms.
Warnings
- A successful sample does not prove a pattern is safe for untrusted production input.
Steps
Enter the pattern and flags
Paste sample text
Run and read matches
How to use Regex tester and explainer
Read the result, not just the colour
Matches are returned as structured rows with indexes and captured groups. Example: with pattern Order ([A-Z]-\d+) and sample Order A-104 shipped, expect a match whose first capture is A-104.
Production caution
The timeout protects this page. It does not certify the same expression under different input lengths or another regular-expression engine.
How it works
- Enter what you haveType or pick your regular expression, sample text. Nothing is submitted anywhere.
- It runs in this tabThe calculation happens on your device, using your browser's own data.
- Take the resultRead the matches, captured groups, syntax explanation, then copy or download.
Worked example
Given: Order A-104 shipped
Result: Match Order A-104 with capture group A-104 when the pattern is Order ([A-Z]-\d+) and flags gi
Uses the browser JavaScript RegExp engine inside a cancellable local Worker.
- Basis
- independent
- Licence
- MIT
- Last reviewed
Frequently asked questions
Why can a regex time out?
Some nested repetitions trigger catastrophic backtracking. The Worker is terminated when it exceeds the local time budget.
Does a green match mean the pattern is production-safe?
No. A successful sample only proves behaviour on that text. ReDoS risk and engine differences still need separate review.