From: Stuart Clarke Date: 2011-03-11T00:22:28+09:00 Subject: Email parsing - help please Hi all, Imagine the following string of data containing d = "Bloggs Joe , Bloggs Keith , Bloggs, Mary , tim.bloggs@domain-a.com" As you can see the format of the email addresses is not consistant, for that reason, I want to parse this string of data and seperated each address with a pipe (|). I have found a solution in java like so: javax.mail.internet.InternetAddress.parse(d).map { |add| add.toString() }.join('|') This works pretty well, however I cannot find a Ruby alternative. I have tried TMail, using the following: TMail::Address.parse(d).map{ |add| add.toString() }.join('|') This however fails as I cannot call map because the data is not in an array. Does anyone have any suggestions? I would really appreciate any guidance. Thanks a lot. -- Posted via http://www.ruby-forum.com/.