Skip to content

Instantly share code, notes, and snippets.

@djanowski
Created August 12, 2014 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save djanowski/307c5414cdc921d883d5 to your computer and use it in GitHub Desktop.
Save djanowski/307c5414cdc921d883d5 to your computer and use it in GitHub Desktop.
cat $1 |
tr '[:upper:]' '[:lower:]' |
sed -e 's/^\.//' |
sed -e 's/\.con$/.com/' |
sed -e 's/\.con\.ar$/.com.ar/' |
sed -e 's/^www//' |
sed -e 's/^\+//' |
sed -e 's/@@/@/' |
sort |
uniq |
perl -ne "print if /\A([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)\$/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment