| Description: |
Extract and generate phone number strings
I have a two step process that I need accomplished in a program. Probably two seperate programs to accomplish these tasks would be best.
1. Extract phone numbers from a string of data 2. Generate phone numbers based on the criteria given.
Program One:
I want a program to extract phone numbers from a few different formats.
Sample Format One:
"Name","Address","City","State","ZIP/Postal","Phone","BusCode","BusOrRes","SolicitFlag","BusType","Last Name","First Name","Middle Initial","Suffix","Secondary Name","URL","Country" "Abaring Josie B","8282 Cambridge St","Houston","TX","77054","713-799-2671","","R","","","Abaring","Josie","B","","","","US" "Abbott April","7200 Almeda Rd","Houston","TX","77054","713-799-9123","","R","","","Abbott","April","","","","","US" "Abendanio Annabelle","8282 Cambridge St","Houston","TX","77054","713-795-4027","","R","N","","Abendanio","Annabelle","","","","","US" "Acholonu Sandra","7900 Cambridge St","Houston","TX","77054","713-799-8088","","R","","","Acholonu","Sandra","","","","","US" "Acosta Jose","8100 Cambridge St","Houston","TX","77054","713-795-5313","","R","N","","Acosta","Jose","","","","","US" "Adam Lianna","7900 Cambridge St","Houston","TX","77054","713-795-0576","","R","","","Adam","Lianna","","","","","US" "Adams Brook","7009 Almeda Rd","Houston","TX","77054","713-550-9058","","R","","","Adams","Brook","","","","","US" "Aguilar D","7900 Cambridge St","Houston","TX","77054","713-791-9480","","R","","","Aguilar","D","","","","","US" "Agyemang Krystal","8282 Cambridge St","Houston","TX","77054","713-795-9552","","R","N","","Agyemang","Krystal","","","","","US"
Sample Format Two: 210 2102159661 07/01/2004 210 2102159671 07/01/2005 210 2102159673 01/01/2004 210 2102159680 07/01/2005 210 2102159682 04/01/2006 210 2102159684 10/01/2004 210 2102159687 10/01/2005 210 2102159690 01/01/2006 210 2102159691 01/01/2005 210 2102159697 01/01/2005 210 2102159699 01/01/2004 210 2102159700 01/01/2004
( I have underlined what I am trying to extract only for demonstration purposes) After extracting the phone numbers from either format, a new text file should be created with only one phone number per line. When opened the new text file with the extracted data should look like this: Example: 713-799-2671 713-799-9123 713-795-4027 713-799-8088 713-795-5313 713-795-0576 713-550-9058 713-791-9480 713-795-9552
The program would need to be able to extract text in excess of 100 MB. Some of the text files to extract from are over 100 MB. This is why I can use excell, and this is why I have problems with other programs.
Program Two I need the ability to generate phone numbers based on the data provided (phone numbers provided). But first the list of data needs to be sorted. This program needs to accomplish 3 steps.
1. Sort Data 2. Analyze Data 3. Generate Phone numbers.
For example: If I provided the following list of phone numbers:
713-555-1014 214-335-7832 713-999-5501 214-335-6001 713-999-5506 713-999-5512 214-335-6007 214-335-7500 713-555-1000 713-555-1001 713-555-1007 214-335-6003 713-555-1011 214-335-6004 713-999-5509 713-555-1004 214-335-6000 713-999-5507 713-999-5502 214-335-6012 713-999-5518 713-999-5500 214-335-6003 713-555-1002 713-555-1010
The first job of this program is to sort the numbers numerically as follows:
214-335-6000 214-335-6001 214-335-6003 214-335-6004 214-335-6007 214-335-6012 214-335-7500 214-335-7832 713-555-1000 713-555-1001 713-555-1002 713-555-1004 713-555-1007 713-555-1010 713-555-1011 713-555-1014 713-999-5500 713-999-5501 713-999-5502 713-999-5506 713-999-5507 713-999-5509 713-999-5512 713-999-5518
The next step is for the program to give the user information about the list, so the user can make some choices. I would like to draw your attention that the purpose of this program is to generate phone numbers based on the gaps in the list provided. However the program must only generate specific numbers based on area code, the prefix, and the final four numbers...if not the list will be un reliable. The program should recognize gaps greater than 50 (This number should be allowed to be changable by the user to any number desired). If a gap is greater than 50 then it goes to the next sequence to be generated.
For example: THe program should recognize that there are 2 different area codes: 214, and 713. The program should recognize how many sperate prefixes there are: 214-335
for 713 713-555 713-999 We are only dealing with generating numbers in existing prefixes.
The program should give the user (based on the list and settings provided) the approx ammount of numbers to be generated, and allow the user to decide to adjust the "ingore if greater than" number. It should also list the prefixes to be generated, and allow the user to to delete unwanted prefixes. It should also list the anything numbers or prefixes that will be ignored in the list because of the ignore function, and give the user an oppertunity to allow it.
Sumary: Give the user: Approx outcome based on the criteria the Prefixes and numbers to be generated (ex: 214-335-6000 to 214-335-6013) The current "ignore if greater than" feature and ask user if he wants to adjust it to get a smaller or larger outcome allow user to delete unwanted prefixes List numbers and prefixes that will be ignored.
Then the user can generate the list
The process:
Then the program should recognize the gaps to be filled in based on the liste above.
214-335-6002 214-335-6005 214-335-6006 213-335-6008 214-335-6009 213-335-6010 214-335-6011 213-335-6013 The program should now recognize a gap greater than 50. The next number in chronoligical order is 214-335-7500 however there are no surrounding number that is less than 50 (7451 to 7549) so the number is ignored. The same thing is true with the next number 214-335-7832, so it is ignored. Next in the list:
713-555-1003 713-555-1005 713-555-1006 713-555-1004 713-555-1008 713-555-1009 713-555-1012 713-555-1013 the program would then recognize again that there are no other numbers with in 50 so it finds the next sequence. 713-999-5503 713-999-5504 713-999-5505 713-999-5508 713-999-5510 713-999-5511 713-999-5513 713-999-5514 713-999-5515 713-999-5516 713-999-5517
The program would also need a feature to ask the user to include all numbers in the final list, or just numbers generated. (original list and generated list, or just generated list.)
|