Member predicate RegExpTerm :: isUsedAsRegExp
Holds if this term is part of a regular expression literal, or a string literal that is interpreted as a regular expression.
isPartOfStringLiteral, this predicate takes
data flow into account, to exclude string literals that aren’t used as regular expressions.
location.href.match("^https://example\\.com/") // YES - String is used as regexpp console.log("Hello world"); // NO - string is not used as regexp /[a-z]+/g; // YES - Regexp literals are always used as regexp
predicate isUsedAsRegExp ( )