hi
I am very new to ruby
what would be the syntax ??

i get output like this

uk-xxxxxxx-Z15A14
Adding uk-xxxxx-Z15A14 (uk-xxxx-Z15A14) as "Generic SNMP-enabled Host" 
using SNMP v1 with community "public"
Success - new device-id: (26)

i will be able to parse the line by

cmd each

cmd.each do |item|
  if ( item =~ /\((\d)\)/ )
     getnumber = item
     end
end

will it work ??

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