Skip to content

victorgrey/email_addresses_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmailAddressesParser

Parse a list of emails pasted into a web form, returning a hash with valid emails as keys and associated data (i.e. names) as values. Pasted values can be comma or line separated. Invalid values are returned in an array.

The default regular expression used for parsing can be overridden with an optional second argument.

Tested with Ruby 1.9.3 but should work with earlier versions.

Installation

  1. git clone git://github.com/victorgrey/email_addresses_parser.git
  2. cd email_addresses_parser
  3. gem build email_addresses_parser.gemspec
  4. (sudo) gem install email_addresses_parser-x.x.x.gem

Usage

valid_items_hash, invalid_items_array = EmailAddressesParser.parse_list(email_addresses_list)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2012 Victor Grey. See LICENSE for details.

About

Parse a list of emails pasted into a web form.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages