r/programmingrequests • • Aug 27 '15

A program that phone numbers to a .txt file

So I have a file that has phone numbers stored one after another (in ANSI?) with no spaces in between and would like to write these phone numbers to a .txt file along with their number in the sequence.

There are upwards of 5000 phone numbers in the file and some are seemingly random such as "03-9-668 " (that's 2 spaces at the end) but they still take up a space in the sequence. They are also ten bits long so they take up the same amount of space as normal phone numbers.

For example if the file said: "5555555555777777777703-9-668 "

If would like a text file that said: 1. 5555555555 2. 7777777777 3. 03-9-668

Thanks in advance to anyone that can do this for me!

2 Upvotes

4 comments sorted by

4

u/ronkato Aug 27 '15

Here you go. .NET is probably overkill, but nevermind. Is this what you wanted? Click Convert, open your file and then a save dialog will appear where you can save the result.

1

u/doominic77 Aug 27 '15

That works perfectly! Exactly what I wanted, thank you.

2

u/ronkato Aug 27 '15

Nice to hear. Happy to help.

1

u/p867 Aug 27 '15

You should post the file or part of the file. Someone will write something to parse it.