McRegex AST · ReDoS

AI-Regex ReDoS Security Scanner

Detect exponential O(2^n) backtracking traps before they hit production. Below is a live vulnerable AI-generated email regex — inspect the AST findings and test your own pattern.

6-Mod AST
custom JS engine
0 bytes
uploaded
ReDoS
static auditor
LOAD:

Visual Railroad Diagram (AST-Compiled SVG)

zero external libs

Test Input & Live Match Inspector

AI-Regex ReDoS Security Audit

SAFE / LINEAR
0/100
ReDoS Risk Score
O(n) Linear
Worst-Case Complexity

    Quick Answers

    Why audit AI-generated regular expressions for ReDoS?

    LLMs frequently emit nested quantifiers like (a+)+ or overlapping alternations that pass small tests but freeze Node.js, Python, or Java servers at 100% CPU on malformed user input. McRegex parses your pattern into an AST and catches these statically in 0 ms.

    Does McRegex send my regex or test strings to a server?

    Never. The AST parser, ReDoS auditor, SVG railroad compiler, adversarial fuzzer, and code exporter run 100% locally in your browser with strict CSP (connect-src 'self') and offline PWA support.

    Why does Go (RE2) or Rust warn about lookarounds?

    Go's regexp package and Rust's regex crate guarantee O(n) linear-time execution by intentionally disallowing lookahead, lookbehind, and backreferences. McRegex flags these automatically when exporting code.