StringTokenizer
String[] result = "this is a test".split("\\s");
for (int x=0; x<result.length; x++)
System.out.println(result[x]);
prints the following output: this is a test
caveat emptor!. JDK 1.4.2 fulfilled the promise of core support for regular expressions. However RegEx usage is computationally expensive since regex should be internally compiled before applying it against a target. If you plan to use a lot of RegEx, objectizing them helps reduce the runtime cost, especially when the expressions don't change, and are often reused. Make sure you compile them using the Pattern class.


