Friday, May 25, 2007

email address scraper

Cool little one-liner to get all the email addresses out of a text file. This is great for scraping HTML pages and creating mailing lists.


perl -wne'while(/[\w\.]+@[\w\.]+\w+/g){print "$&\n"}' test.txt

No comments: