This commit is contained in:
Esben Sparre Andreasen 2019-06-03 08:32:35 +02:00
Родитель 7018a38691
Коммит 14644270ac
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -22,7 +22,7 @@ import javascript
*/
predicate isInterestingSemiAnchoredRegExpString(RegExpPatternSource src, string msg) {
exists(string str, string maybeGroupedStr, string regex, string anchorPart, string escapedDot |
// a dot that might be escaped in a regular expression, for example `/\./` or new `RegExp('\\.')`
// a dot that might be escaped in a regular expression, for example `/\./` or `new RegExp('\\.')`
escapedDot = "\\\\[.]" and
// a string that is mostly free from special reqular expression symbols
str = "(?:(?:" + escapedDot + ")|[a-z:/.?_,@0-9 -])+" and