You realise StringTokenizer is regarded as legacy code? It tells you in the API link what you ought to use instead.
Google for JFlex and in its manual you will find instructions how to write a lexer forJava (I think it's an old version, but that doesn't matter). In that code or in the "simple example", you will find a regular expression for integers. You can probably find similar regular expressions elsewhere easily enough.
Go through the Java™ Tutorials and you will find a nice section about regular expressions.
That should help.
Joined: Apr 29, 2010
I was able to capture specific data from within a string from a text file using the tokenizer. Now Im stuck on how to pull the captured strings back together so its readable.. (not displayed line by line).
The output displays as: