Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
Sort an array of 0's 1's 2's 3 pointer approach
Bank System
Finding Biggest Square
Split
java
Consecutive Elements String
stringkeyvalues
Chiper
// Java Coding Challenge - 08: Reversing a Number using String
currency.java
Please log in to post a comment.