What I want to split is the following string:
<java><jquery><comments> I use the following split method like this:
String s = "<java><jquery><comments>"; String[] arr = s.split("<|>"); for(String a: arr){ System.out.println(a); } The output is the following:
java jquery comments The problem is I don't want the blank line. The size of the array returned from splitting is 6. What I want it to be is 3 letter strings only.
Should I use regular expression to get all letters, or use split like above?