public int obtenerNumOraciones(String texto) {
Pattern patron = Pattern.compile("[a-z]*");
Matcher match = patron.matcher(texto);
int cant = 0;
while(match.find()){
cant++;
}
return cant;
}
If I put text = hello, this method returns me 2, since I have to return a 1, I do not understand why it returns 2