Filter emails?

blommas

Senior Member
Joined
Jun 14, 2014
Messages
904
Reaction score
158
Hey, just got my hands on 100k emails from facebook users, but in the list there are different information that only the email.
How can I filter it, so I ONLY have the emails?
 
What is the format of your data?
 
Do you just need the email address and not anything else? A bit of php can do it for you.

Save the following code as a php file and run it directly. your file's name should be file.txt and it should be at the same folder where your php file is, if you don't make any changes to the script.

set_time_limit(0) prevents script timeout. So it should work for a very large file too. Just wait patiently till the script does it's job.
Code:
<?php

error_reporting(E_ALL);
set_time_limit(0);

$content = file_get_contents('file.txt');
$pattern = "/[a-z0-9_\-\+]+@[a-z0-9\-]+\.([a-z]{2,3})(?:\.[a-z]{2})?/i";
preg_match_all($pattern,$content,$emails);
$emails = @implode(',',$emails[0]);
header('Content-type: text/csv');
header('Content-Disposition: attachment; filename="emails_export_'.strtotime("now").'.csv"');
echo $emails;
 
or you could just use an email cleaner , most of them free....
 
Do you just need the email address and not anything else? A bit of php can do it for you.

Save the following code as a php file and run it directly. your file's name should be file.txt and it should be at the same folder where your php file is, if you don't make any changes to the script.

set_time_limit(0) prevents script timeout. So it should work for a very large file too. Just wait patiently till the script does it's job.
Code:
<?php
how do I open the .php file? no programs are working :S
 
I think mailchimp helo filter emails free of charge.
Trying them now. They need to review the list, but there are "passwords" for accounts, so they might decline the list.
 
My goodness, don't you have a server or something? :o
You can do it on your local machine too. Download Wamp server and set it up and then follow this tutorial:
isnt it possible without a sever?
 
haha xD new to all this kind of stuff..
 
Hmm that was for humor. There's a first time for everything. Try it out it should work, tested on my localhost. Best of luck.
haha xD new to all this kind of stuff..
 
Hey, just got my hands on 100k emails from facebook users, but in the list there are different information that only the email.
How can I filter it, so I ONLY have the emails?

http://marketing101.ws/free_email_extractor_tool.html <----- Check this website and use their free email extractor tool. Watch the tutorial first on that same link.

This tool will help you filter the emails in seconds and I guarantee it's 100% working. Thanks! :)
 
Not impossible really. If you do a regex search in NPP with:
[a-z0-9_\-\+]+@[a-z0-9\-]+\.([a-z]{2,3})(?:\.[a-z]{2})?
You will get those emails matched. The only challenge is to export them properly ;)
Notepad++ replace option can do the trick. )? what rlly
 
Back
Top