I have the following string in a file called mib.txt:
[name=1.3.6.1.2.1.1.5.0, value=myrouter.ad.local (OCTET STRING)]
name the following code:
f = File.read("/temp/mib.txt")
name = f.match(/1.3.6.1.2.1.1.5.0/)
puts "device name is #{name}"
It returns the 1.3.6.1.2.1.1.5.0
just like I asked it to, but what I really want is to find the string the contains 1.3.6.1.2.1.1.5.0
and parse out the value myrouter.
Thanks in advance for your help