Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Rextester.java
//Title of this code //'main' method must be in a class 'Rextester'. 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 ";//Scanner scan = new Scanner(System.in); //String s = scan.nextLine(); 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]); } //scan.close(); } }
run
|
edit
|
history
|
help
0
Nick-test
4.a
karyawan
Ways to form Max Heap
191fa07050
1.7
Alphabets
Vowel Substring
Find kth element from last in a singly linked list
Escaping Literals II