I am writing a piece of code in which i have to find only complete words for example if i have
String str = \"today is tuesday\";
and I\'m
String[] tokens = str.split(" "); for(String s: tokens) { if ("t".equals(s)) { // t exists break; } }