CodeQL library for JavaScript
Search

Member predicate RegExpTerm::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()