James,
Check the JavaDocs again on the usage of StringTokenizer,  it does have the
ability to have multiple delimeters.  You specify the delimiters in the 2nd
argument of the constructor.  The nextToken() method will return the token
with or without the delimiting characters depending on the value of  the
returnDelims flag in the constructor.  If you need to find the char
position of the token, you could first copy the stringbuffer into a string
variable and then do a String.indexOf() call to return the char position.

Regards,

Richard Yee
At 02:06 PM 10/1/01 -0400, you wrote:

>I am trying to take a line of text from a StringBuffer object and pull out
>a chunk of text from it.  I has investingated the StringTokenizer, but
>this sorts with only one delim.  also, Tokenizer cannot return me the
>location #(on the line) of the tokens.  only the amount of them.
>
>question...
>what can I use to return 2 delimeters, and the locations of
>both?  essentially I want the characters between the two tokens.
>James McKain  800.473.3789 x2013  Contract Support Engineer     lDePuy
>Orthopaedics, Inc.
>                            a Johnson & Johnson  Company

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to