I'm having some trouble with the StringTokenizer. As far as I can tellstops
there is something wacky going on due to the + or : in the delimiter.
I have the following string:
Sep 29, 2009 7:00 PM GMT+00:00 Sep 30, 2009 7:30 PM GMT+00:00
I am using "GMT+00:00" (no quotes) as the delimiter.
The String#split method correctly splits the string in to the array
elements using a simple regex:
String tokens = text.split("GMT\\+00:00");
The StringTokenizer splits on the first double zero in 2009 and then
at the colon in the time next:contact
StringTokenizer t = new StringTokenizer(text, "GMT+00:00");
The 1st two tokens are:
Sep 29, 2
Has anyone seen this behavior before? Am I missing something obvious?
Electronic Data Processing Services
This communication and any transmitted documents are intended to be
confidential. If there is a problem with this transmission, please
the sender. If the reader of this message is not the intended recipient,or
the employee or agent responsible to deliver it to the intendedrecipient,
you are hereby notified that any dissemination, distribution or copyingof
this communication is strictly prohibited.(JAVA400-L)
This is the Java Programming on and around the iSeries / AS400
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.