Please help me split the following string into tokens, I tried using stringtokenizer and split function but couldn't get the correct output. The strings are not constant, I mean the strings are of variable length.
Below is one of the string -
<http://data-gov.tw.rpi.edu/raw/8/data-8-00001.rdf#entry1536> <http://data-gov.tw.rpi.edu/vocab/p/8/update_date> "2004-10-27 09:37:21" .
The output that I got is -
"2004-10-27 ----------------- (Problem Lies Here)
09:37:21"------------------(Problem Lies Here)
As marked above, I need "2004-10-27 09:37:21" separately in a single string. But according to my splitting program, I am getting "2004-10-27 and 09:37:21" in different strings.
The ideal output should be something like this -
We can ignore the last . The "." signifies the end of 1 tuple and the begining of the next string. PLease help.
How are we supposed to help? Are you asking for a code segment that will generate this or are you asking for us to fix your code? I don't think you posted it very clearly.
If you posted your code segment, we could analyze it and see whats causing your problems.
I apologize for not explaining my problem clearly, here is my code -
while ((temp_string = input.readLine()) != null)
String tokens = temp_string.split(" ");
for (int count = 0; count < tokens.length; count++)
I know the reason I am getting the output mentioned above is because I am using only space in the split function. I don't really need any code but would really appreciate if you could help me figure out a way around it so that I can get the correct output as mentioned above. Thanks,
I got the solution, thanks.