Identify ReDoS vulnerabilities and catastrophic backtracking risks in real-time.
Best Practices for Secure Regex
Regular Expression Denial of Service (ReDoS) occurs when a regex pattern contains ambiguity that forces the engine to explore an exponential number of paths to determine a match failure.
Avoid nested quantifiers (e.g., (a+)+). Ensure overlapping character classes are not repeated. Use atomic grouping or possessive quantifiers where supported.