diff --git a/java/ql/lib/semmle/code/java/security/regexp/NfaUtilsSpecific.qll b/java/ql/lib/semmle/code/java/security/regexp/NfaUtilsSpecific.qll index d2ddb24d79e..742229eacca 100644 --- a/java/ql/lib/semmle/code/java/security/regexp/NfaUtilsSpecific.qll +++ b/java/ql/lib/semmle/code/java/security/regexp/NfaUtilsSpecific.qll @@ -58,6 +58,14 @@ module RegExpFlags { root.getLiteral().isIgnoreCase() } + /** + * Gets the flags for `root`, or the empty string if `root` has no flags. + */ + deprecated string getFlags(RegExpTerm root) { + root.isRootTerm() and + result = root.getLiteral().getFlags() + } + /** * Holds if `root` has the `s` flag for multi-line matching. */