mirror of
https://github.com/github/codeql.git
synced 2025-12-28 14:46:33 +01:00
Fix issue with named backrefs; add needed import
This commit is contained in:
@@ -258,6 +258,9 @@ class RegExpQuantifier extends RegExpTerm, TRegExpQuantifier {
|
||||
result.occursInRegex(re, start, part_end)
|
||||
}
|
||||
|
||||
/** Holds if this term may match zero times. */
|
||||
predicate mayBeEmpty() { maybe_empty = true }
|
||||
|
||||
/** Holds if this term may match an unlimited number of times. */
|
||||
predicate mayRepeatForever() { may_repeat_forever = true }
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ abstract class RegexString extends StringLiteral {
|
||||
this.getChar(start + 1) = "k" and
|
||||
this.getChar(start + 2) = "<" and
|
||||
end = min(int i | i > start + 2 and this.getChar(i) = ">") + 1 and
|
||||
name = this.getText().substring(start + 3, end - 2)
|
||||
name = this.getText().substring(start + 3, end - 1)
|
||||
}
|
||||
|
||||
private predicate numberedBackreference(int start, int end, int value) {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
private import java
|
||||
import semmle.code.FileSystem
|
||||
import semmle.code.java.regex.RegexTreeView
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user