Community
Participate
Working Groups
The JDK 1.4 supplies a new method for the String class called split(). The split method takes a String parameter that represents a regular expression. The java editor reports an error when the character in the string is escaped unless the character being escaped is one of a very few characters. For example String[] myStringArray = originalString.split("\)"); causes an error claiming that ')' is not a valid escaped character. If I do not escape it, the regular expression parser throws an exception claiming a parenthesis is missing.
Try to write this: String[] myStringArray = originalString.split("\\)"); If you want the character \, you need to put \\ in a java string. Let me know if this is ok to close.
Close as INVALID.