Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Parse * delimited string  RSS feed

 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
What is the best way to parse * delimited string. I mean onto an array of strings or something.

Thanks.
 
Uli Hofstoetter
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anything wrong with String.split?
 
John Landon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
noh tokenizer is the right thing. Thanks though
 
Campbell Ritchie
Sheriff
Posts: 53734
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, Tokenizer is legacy code. String#split is correct. Remember the * is a metacharacter and needs to be escaped.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!