Robert Klemme
1/27/2009 1:49:00 PM
2009/1/27 Newb Newb <revathy.p@angleritech.com>:
> Hi Friends
>
> i have following string
>
> jayabharathy@angleritech.com~Vs~kannan@angleritech.com
>
> the above string has 2 email ids in it.but i need only names of it.
>
> i want to extract only the names
>
> jayabharathy
>
> kannan
Something like this can work, depends of course on the names that you
want to allow:
names = str.scan(/(\w+)@[a-z._-]+/i).flatten
Cheers
robert
--
remember.guy do |as, often| as.you_can - without end