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

    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
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

  3. #3
    Join Date
    Mar 2009
    Posts
    31
    Rep Power
    0

    Default

    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, 06:12 AM
  2. String.format not in javadoc
    By ortollj in forum New To Java
    Replies: 3
    Last Post: 11-08-2009, 06: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, 09:41 PM
  4. Replies: 3
    Last Post: 08-20-2009, 04:57 PM
  5. Replies: 15
    Last Post: 09-29-2008, 08: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
  •