CodeQL library for JavaScript/TypeScript
codeql/javascript-all 0.9.1 (changelog, source)

Member predicate RegExpConstant::getConstantValue

Gets the single string this regular-expression term matches.

This predicate is only defined for (sequences/groups of) constant regular expressions. In particular, terms involving zero-width assertions like ^ or \b are not considered to have a constant value.

Note that this predicate does not take flags of the enclosing regular-expression literal into account.

string getConstantValue()