CodeQL library for JavaScript
Search

Predicate CharacterEscapes::getALikelyRegExpPatternMistake

Gets a character in n that is preceded by a single useless backslash, resulting in a likely regular expression mistake explained by mistake.

The character is the ith character of the raw string value of rawStringNode.

Import path

import semmle.javascript.CharacterEscapes
string getALikelyRegExpPatternMistake(RegExpPatternSource src, string mistake, ASTNode rawStringNode, int i)