regex count in single match
- by 01
i want to check if string doesnt have more than 5 numbers, i can do it this way
Matcher matcher = Pattern.compile("\\d").matcher(val);
i = 0;
while (matcher.find()) {
i++;
}
However i would like to do it without while(because we are using regex validation framework).
I want to be able to match strings like
A2sad..3f,3,sdasad2..2