I have this small piece of code
String[] words = {\"{apf\",\"hum_\",\"dkoe\",\"12f\"}; for(String s:words) { if(s.matches(\"[a-z]\")) { Syste
I have faced the same problem once:
Pattern ptr = Pattern.compile("^[a-zA-Z][\\']?[a-zA-Z\\s]+$");
The above failed!
Pattern ptr = Pattern.compile("(^[a-zA-Z][\\']?[a-zA-Z\\s]+$)");
The above worked with pattern within ( and ).
(
)