CodeQL library for Java/Kotlin
codeql/java-all 4.1.1-dev (changelog, source)
Search

Member predicate Impl::RegExpGroup::getNumber

Gets the index of this capture group within the enclosing regular expression literal.

For example, in the regular expression /((a?).)(?:b)/, the group ((a?).) has index 1, the group (a?) nested inside it has index 2, and the group (?:b) has no index, since it is not a capture group.

int getNumber()