number of matches regex java

Solutions on MaxInterview for number of matches regex java by the best coders in the world

showing results for - "number of matches regex java"
Kenan
07 Jan 2017
1// Java 9+
2long matches = matcher.results().count();
3
4// Java 8-
5int count = 0;
6while (matcher.find())
7{
8	count++;
9}