Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Rep Power

    Default Help with checking for a certain format in a String

    I am creating a program that reads a text file of phone numbers. I have to make sure the phone numbers are in the format of xxx xxx xxxx or xxx xxxx. I can't figure out how to check for this format in the constructor. Can someone help me by writing out a pseudocode for this procedure? I don't want the code as I can do that I'm just having trouble developing an algorithm for it.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

  3. #3
    Join Date
    Mar 2009
    Rep Power


    I'm not allowed to use this in my code. My professor wants us to use only things that we have learned so far.

Similar Threads

  1. format content of String[]
    By eponcedeleon in forum Advanced Java
    Replies: 9
    Last Post: 02-23-2010, 05:12 AM
  2. String.format not in javadoc
    By ortollj in forum New To Java
    Replies: 3
    Last Post: 11-08-2009, 05:14 PM
  3. spliting a string and checking each token's format
    By Implode in forum New To Java
    Replies: 1
    Last Post: 10-18-2009, 08:41 PM
  4. Replies: 3
    Last Post: 08-20-2009, 03:57 PM
  5. Replies: 15
    Last Post: 09-29-2008, 07:18 AM

Posting Permissions

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