From: Xavier Noria Date: 2007-06-21T08:15:41+09:00 Subject: Re: strange ... I'm getting crazy On Jun 21, 2007, at 1:10 AM, J. mp wrote: > str = "teste@test.com, alf@test.com, joe@teste.com" > > emails_array = Array.new > emails = str.split(",") > emails.each do |single_str| > > tmp = single_str[/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i] There's a space after each comma in str that the regexp does not allow. Either remove them or split by /\s*,\s*/. -- fxn