Results 1 to 3 of 3

Thread: StringTokenizer

  1. #1
    Toluwase is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default StringTokenizer

    Line of code:StringTokenizer stk = new StringTokenizer(str," \\t @#$%^&*/,'|'}{\n 1234567890-=\"():,'][-;");
    The line of code above does not take a tab as a delimiter, but I do not know how to represent a tab as a delimiter. Anyone in the house that can help me with this?

  2. #2
    camickr is offline Senior Member
    Join Date
    Jul 2009
    Posts
    1,234
    Rep Power
    7

    Default Re: StringTokenizer

    Does the newline character work?

  3. #3
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: StringTokenizer

    That is an insane tokenizer....is that supposed to be the delimiter, or do you wish to tokenize on any of those characters within? If the latter, use String.split and the appropriate regular expression

Similar Threads

  1. Need help with StringTokenizer bad
    By Metastar in forum New To Java
    Replies: 5
    Last Post: 10-26-2010, 09:42 PM
  2. Help regarding StringTokenizer
    By mahesh19nov in forum New To Java
    Replies: 3
    Last Post: 10-26-2010, 09:25 AM
  3. StringTokenizer
    By carderne in forum New To Java
    Replies: 1
    Last Post: 01-26-2008, 08:19 PM
  4. StringTokenizer
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-08-2007, 08:48 AM
  5. StringTokenizer
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-03-2007, 09:24 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
  •