The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
April 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Inputing tokens within strings

Posted by Craig on May 20, 2001 at 4:01 AM


I'm having lots of problems trying to get all the tokens between a recurring one. I have tokenised a string using stringTokeniser and placed the resulting output into a vector. However, I can easily find the occurence of specific tokens, but I want to pass whats between to another vector.

This is a generalised representation of my string before tokenising:
1:A:B:C:D:E:F:1
How can I get A B C D E F and one occurence of 1 into a single vector and repeat until end of file?

Thanks in advance.




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us