Problem splitting a string.

Hi All,I'm trying to split a string by using the white space reg exp ie:result = cmdSplit.split("\s");However, this won't compile. I get an "illegal escape character" error.This is for Java 1.4.Any Ideas?Thanks.
[287 byte] By [Doug_Ca] at [2007-11-26 19:47:44]
# 1
result = cmdSplit.split("\\s");
PhHeina at 2007-7-9 22:34:50 > top of Java-index,Java Essentials,New To Java...
# 2
The backslash is an escape character in Java source code. You have to escape it if you want to insert it literally. Like this:result = cmdSplit.split("\\s");
jesperdja at 2007-7-9 22:34:50 > top of Java-index,Java Essentials,New To Java...
# 3
Thanks all.
Doug_Ca at 2007-7-9 22:34:50 > top of Java-index,Java Essentials,New To Java...