Extract phone numbers from a chat history

soxtexo

Newbie
Joined
Sep 13, 2017
Messages
24
Reaction score
3
Hey guys,

I've got a chat history from a WhatsApp group.

The structure of the text looks like:

....
05.12.17, 06:55:25: ‎‪+49 173 71696**‬ hat die Gruppe verlassen
05.12.17, 06:56:25: ‪+49 176 642603**‬: Hast du noch einen guten ab 21 Uhr ?
05.12.17, 06:57:04: ‪+49 176 706610**‬: Heute muss rasiert werden
05.12.17, 06:57:25: ‪+49 1516 15348**‬: chillt
...

Now I would like to extract all the numbers out of this txt. file
I would like to get a list of numbers where every number is unique with no double numbers.

Does anyone have an idea what's the easiest way to do this? :) Thanks you guys!
 
I believe you can do this in less than 5 minutes using regex (notepad++ or any other text editor) to extract the numbers + excel to remove duplicates
 
Hey guys,

I've got a chat history from a WhatsApp group.

The structure of the text looks like:

....
05.12.17, 06:55:25: ‎‪+49 173 71696**‬ hat die Gruppe verlassen
05.12.17, 06:56:25: ‪+49 176 642603**‬: Hast du noch einen guten ab 21 Uhr ?
05.12.17, 06:57:04: ‪+49 176 706610**‬: Heute muss rasiert werden
05.12.17, 06:57:25: ‪+49 1516 15348**‬: chillt
...

Now I would like to extract all the numbers out of this txt. file
I would like to get a list of numbers where every number is unique with no double numbers.

Does anyone have an idea what's the easiest way to do this? :) Thanks you guys!

Use something like "\+[0-9]{2} [0-9]{3,4} [0-9]{4}/g" in any regex editor
 
If the data is formatted like that, you can split the lines into columns by the "+" and ":" delimiters in Excel, so you'll have the phone numbers in one column, what you can copy-paste to Notepad++ and use the TextFX plugin to remove duplicates.
 
or Pay someone like 5 bucks to write a quick script
 
if you are looking to get into text and data manipulation, automation, or data vi... I recommend Python... check out split() function.
 
Back
Top