Skip to content
/text local tool

Test JavaScript Regex with Timeouts and Regression Cases

Build JavaScript regex with token explanations, match evidence, regression cases and isolated execution timeouts.

  • JavaScript ECMAScript with named capture groups
  • 300 ms Worker budget after startup
  • Matches, replacements and regression cases
Local execution receiptinput path disclosedTool content stays out of MonoTools URLs and API requests.
Working input
Browser memory
Cross-tool handoff
Session only · 10 min
URL payload
Never
Export
Explicit action

Verify it: open DevTools Network, clear the log, use the tool, then inspect fetch/XHR requests. Page assets and optional aggregate analytics may use the network; tool input is not included.

Full privacy model
Loading tool...
01

How to use

  1. 01Type your pattern (without slashes) into the regex field.
  2. 02Choose JavaScript flags, paste bounded test text and enter an optional replacement expression.
  3. 03Review token explanations, coverage, captures and replacement evidence, then run expected-match regression cases.
  4. 04Save pattern, flags and regression cases locally without persisting test text or replacements.
02

FAQ

Which regex flavor does this use?
It uses the current browser's JavaScript ECMAScript RegExp engine. PCRE, Python and .NET syntax is not translated, and flavor differences are called out.
Can a catastrophic pattern freeze the page?
Matching runs in a dedicated Worker. Its 300 ms execution budget starts after the Worker is ready, and match, capture and replacement outputs also have explicit size limits.
How are named capture groups reported?
Use JavaScript syntax such as (?<name>...). Each match lists numbered and named captures separately, including unmatched groups, and generated code keeps the original group names.
How does the replacement preview work?
It uses JavaScript replacement tokens such as $&, $1, $<name> and $$. The preview is bounded, runs in the same isolated Worker and never changes the test text.
What is included in a shared pattern link?
Only the pattern and flags. Test text and replacement content stay out of the URL.
Does the risk diagnostic prove a regex is ReDoS-safe?
No. It flags common ambiguous or nested constructs and the Worker enforces a local timeout. Production safety still requires representative near-miss regression inputs and limits in the real runtime.
03

Related tools