regex_lint
Static safety analysis of a regular expression plus an English explanation of what it matches. Parses the pattern into an AST and flags the structures that cause catastrophic backtracking (ReDoS): nested unbounded quantifiers like (a+)+, repeated alternations whose branches can start with the same character like (a|ab)*, adjacent unbounded quantifiers over overlapping character sets like \d+\d+, and implausibly large bounded repeats. The pattern is COMPILED but never EXECUTED against input - running a caller-supplied regex is itself the denial-of-service vector. Detection is a structural heuristic, so a risk of "none" means no known dangerous shape was found, not a proof of safety. Deterministic, no LLM.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flags | No | Optional inline flags, any of "imsxau" (ignorecase, multiline, dotall, verbose, ascii, unicode). | |
| pattern | Yes | The regular expression source, without delimiters. Max 2,000 characters. |