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

Module Make::RegexpMatching

A module for determining if a regexp matches a given string, and reasoning about which capture groups are filled by a given string.

The module parameter isCandidate determines which strings should be tested, and the results can be read from the matches and fillsCaptureGroup predicates.

Import path

import codeql.regex.nfa.RegexpMatching

Predicates

fillsCaptureGroup

Holds if matching str against reg may fill capture group number g. Only holds if str is in the testWithGroups predicate.

matches

Holds if reg matches str, where str is in the isCandidate predicate.

Parameters