You are viewing a single comment's thread. Return to all comments →
if(s.trim().length() > 0){ String[] sa = s.trim().split("[ !,?._'@]+");
System.out.println(sa.length); for(int i=0; i<sa.length; i++){ System.out.println(sa[i]); } } else { System.out.println("0"); }
Seems like cookies are disabled on this browser, please enable them to open this website
Java String Tokens
You are viewing a single comment's thread. Return to all comments →
if(s.trim().length() > 0){ String[] sa = s.trim().split("[ !,?._'@]+");