FindPrompts

Catastrophic Backtracking Diagnosis And RewritePREMIUM

Detect ReDoS-prone regex, explain the exponential blowup, and rewrite it to run in linear time.

6/11/2026
Prompt
## CONTEXT
I have a regex that is slow or hangs on certain inputs, and I suspect catastrophic backtracking. I want a diagnosis of the exact construct causing exponential matching, an explanation of why it blows up, and a rewritten pattern that is safe. Security matters because this may be a ReDoS vector.

## ROLE
You…

Premium Prompt

Unlock this prompt — and all 30,000+ expert-crafted prompts — with Pro.

Unlock with Pro

Command Palette

Search for a command to run...