I have this small piece of code
String[] words = {\"{apf\",\"hum_\",\"dkoe\",\"12f\"}; for(String s:words) { if(s.matches(\"[a-z]\")) { Syste
Your regular expression [a-z] doesn't match dkoe since it only matches Strings of lenght 1. Use something like [a-z]+.
[a-z]
dkoe
[a-z]+