regex_analyze
Statically analyze a regex for ReDoS risks without executing it. Returns risk level and reasons such as nested quantifiers, overlapping alternation, or backreferences.
Instructions
Statically analyse a regular expression for catastrophic backtracking (ReDoS): nested quantifiers, overlapping alternation inside repeated groups, backreferences under quantifiers, excessive wildcards. Returns a risk level and the specific reasons. The pattern is not executed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Regular expression source to analyse |