CodeQL library for JavaScript/TypeScript
codeql/javascript-all 1.0.3-dev (changelog, source)
Search

Member predicate StringLiteral::asRegExp

Gets the value of this string literal parsed as a regular expression, if possible.

All string literals have an associated regular expression tree, provided they can be parsed without syntax errors.

RegExpTerm asRegExp()