Results 1 to 2 of 2
  1. #1
    hussainian is offline Member
    Join Date
    Mar 2010
    Posts
    1
    Rep Power
    0

    Default String Tokenizer

    Hi!
    I've a string "abc,def---ghi-jkl-mno"
    I want to tokenize it with "---" delimiter.
    I write

    StringTokenizer st = new StringTokenizer("abc,def---ghi-jkl-mno","---");

    Now the expected or required result is that there are two tokens i.e.

    abc,def and ghi-jkl-mno

    but the tokens are

    abc,def
    ghi
    jkl
    mno

    Can anyone please tell me what is the rule?????
    and How can I do what I want to do?
    Thanks.
    Muhammad AsadUllah.

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

Similar Threads

  1. Java String Tokenizer
    By zaz_rin in forum Forum Lobby
    Replies: 2
    Last Post: 03-17-2010, 04:17 AM
  2. String Tokenizer
    By viperlasson in forum New To Java
    Replies: 1
    Last Post: 03-09-2010, 01:14 PM
  3. String Tokenizer
    By redasu in forum Advanced Java
    Replies: 4
    Last Post: 02-19-2010, 03:30 AM
  4. string tokenizer
    By twinytwo in forum New To Java
    Replies: 2
    Last Post: 03-26-2009, 02:10 PM
  5. String Tokenizer And Arraya
    By everlast88az in forum Advanced Java
    Replies: 2
    Last Post: 11-06-2008, 11:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •