import java.io.*;
import java.util.*;
public class Rextester {
public static void main(String[] args) {
String s = "Its always better if you find edge cases by yourself rather than buying test cases with valuable hackos!! May be this case won't help you to find the buuuuuug ";
s = s.replaceAll("[\\p{Punct}&&[^']]","");
String[]tokens = s.split(" |\\'");
System.out.println(tokens.length);
for(int i=0;i<tokens.length;i++){
System.out.println(tokens[i]);
}
}
}
|