>
> s = "host1.temp.temp.com"
> s[/\..*/,1]

Shouldn't that be s[/\..*/,0] or s[/\..*/] ?

-- 
Posted via http://www.ruby-forum.com/.