From: "J. mp" Date: 2007-06-21T08:18:26+09:00 Subject: Re: strange ... I'm getting crazy Xavier Noria wrote: > 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 God bless you. you're right I'm stupid thanks -- Posted via http://www.ruby-forum.com/.