I want to read data out of a file by means of a Scanner object whereby the delimiter contains the word "part".
Is there a way to keep the delimiter in the resulting data?
I am using the word "part" in de delimiter, however this word could not be found in the resulting data.
read the complete line and use a StringTokenizer to split it up.
unfortunately, with a StringTokenize, I can not split by means of a whole word ("part" for instance) nor an regular expression.
Any solution ?
Use split() then, and append the delimiter onto the end of all but the last token.