public class PatternSplitExample { public static void main(String args[]) {
Pattern p = Pattern.compile(" ");
String tmp = "this is the String I want to split up";
String[] tokens = p.split(tmp);
for (int i = 0; i < tokens.length; i++) {
System.out.println(tokens[i]);
}