This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Parse * delimited string" Watch "Parse * delimited string" New topic
Author

Parse * delimited string

John Landon
Ranch Hand

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

Thanks.
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: 228
noh tokenizer is the right thing. Thanks though
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44590
    
  34
No, Tokenizer is legacy code. String#split is correct. Remember the * is a metacharacter and needs to be escaped.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Parse * delimited string
 
jQuery in Action, 3rd edition