Last active
December 19, 2015 11:09
-
-
Save mileszs/5945923 to your computer and use it in GitHub Desktop.
I finally wrote a script for pulling twitter usernames out of the Hacks && Happenings newsletters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TWITTER_LINKS = /twitter\.com\/([\w\/]*)/ | |
| usernames = File.open('email.txt', 'r').readlines.map do |line| | |
| matches = line.scan(TWITTER_LINKS).flatten | |
| end.compact.flatten | |
| ['mileszs', '_swanson'].each { |n| usernames.delete(n) } | |
| puts "... content from #{usernames.join(', ')}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment