Regex.getCaptureCount

int getCaptureCount()

Returns the number of capturing subpatterns in the pattern.

Returns

the number of capturing subpatterns