ruby script that harvests emails from strings
#data contact info mining
class Emails
def getallcom(text)
return text.scan(/[a-zA-Z0-9.]+\@[a-zA-Z]+\.com/)
end
def getalledu(text)
return text.scan(/[a-zA-Z0-9.]+\@[a-zA-Z]+\.com/)
end
end
#
#=> :getallemails
# getallemails(" f jweinst1@berkeley.com foobar@foo.com")
#=> ["jweinst1@berkeley.com", "foobar@foo.com"]