Results 1 to 3 of 3
  1. #1
    ZeCute is offline Member
    Join Date
    May 2010
    Rep Power

    Default Exclude character

    I have a short question. I am trying to use the Scanner class to get a specific data from a Vector which I have converted to a string object. I use the replaceAll method to replace the character I donīt wont to get. But my problem is that I have no idea hove I do to exclude the List element char: "[]". Hove can i format my method so I can get rid of them?

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power


    What have you tried? What did it do that you weren't expecting (or what did it not do that you were expecting)? Have you looked at the Pattern class documentation?
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    If the [] are always the first and last character, look at using the substring method to get what is in between.

Similar Threads

  1. Replies: 0
    Last Post: 02-22-2010, 01:44 AM
  2. Read from a certain character to a certain character
    By blackstormattack in forum New To Java
    Replies: 0
    Last Post: 03-16-2009, 11:36 AM
  3. Replies: 0
    Last Post: 03-30-2008, 10:12 AM
  4. reading text character by character
    By bugger in forum New To Java
    Replies: 2
    Last Post: 11-09-2007, 08:54 PM
  5. Replies: 0
    Last Post: 09-26-2007, 08:42 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