File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Parse * delimited string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Parse * delimited string" Watch "Parse * delimited string" New topic

Parse * delimited string

John Landon
Ranch Hand

Joined: Sep 25, 2008
Posts: 227
What is the best way to parse * delimited string. I mean onto an array of strings or something.

Uli Hofstoetter
Ranch Hand

Joined: Nov 24, 2006
Posts: 57
Anything wrong with String.split?

SCEA5, Certified ScrumMaster
John Landon
Ranch Hand

Joined: Sep 25, 2008
Posts: 227
noh tokenizer is the right thing. Thanks though
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38107
No, Tokenizer is legacy code. String#split is correct. Remember the * is a metacharacter and needs to be escaped.
It is sorta covered in the JavaRanch Style Guide.
subject: Parse * delimited string
Similar Threads
Suggestions on fastest way to parse a String?
parsing comma delimited string
Split a String
Returning array from applet to JavaScript
passing array from processAction to jsp