Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

number of matches regex java

// Java 9+
long matches = matcher.results().count();

// Java 8-
int count = 0;
while (matcher.find())
{
	count++;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #number #matches #regex #java
ADD COMMENT
Topic
Name
1+5 =