Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
CodeQL library for Java/Kotlin
codeql/java-all 7.2.0 (changelog, source)

Predicate regexMatchedAgainst

Holds if the string literal regex is a regular expression that is matched against the expression str.

As an optimisation, only regexes containing an infinite repitition quatifier (+, *, or {x,}) and therefore may be relevant for ReDoS queries are considered.

Import path

import semmle.code.java.regex.RegexFlowConfigs
predicate regexMatchedAgainst(StringLiteral regex, Expr str)