From: Dejan Dimic Date: 2008-07-20T18:11:05+09:00 Subject: Re: filtering email addresses On Jul 20, 10:15 am, Luca Scaljery wrote: > Hi All > > I'm trying to filter email adresses like this > > #! /usr/bin/ruby > > email = "test_test.test" > > if email.scan(/\@/) >   p "yes" > end > > For some reason my program always prints 'yes' > > How would should I do this ? > > thnx > LuCa > -- > Posted viahttp://www.ruby-forum.com/. ------------------------------------------------------------ String#scan str.scan(pattern) => array str.scan(pattern) {|match, ...| block } => str ------------------------------------------------------------------------ so if email.scan(/\@/) is always true ;-)