T
Thierry Ciot
Guest
To count instances of strings, you can use the following as suggested here stackoverflow.com/.../22566637 String in = "i have a male cat. the color of male cat is Black"; int i = 0; Pattern p = Pattern.compile("male cat"); Matcher m = p.matcher( in ); while (m.find()) { i++; } System.out.println(i); // Prints 2 Of course you would put this code in an extended operator as suggested earlier. Thierry
Continue reading...
Continue reading...