From: ctyu Date: 2006-08-20T09:05:10+09:00 Subject: Re: {} as record separators? ** first try ** data = {} File.foreach( "nagios.dat" ) do |e| next if e =~ /service \{|\}/ k,v = e.strip.split("=") data[k] = v end it didnt work because of line below has more than one "=" > performance_data=time=0.116677s;;;0.000000 size=3998B;;;0 ** second try ** data = {} File.foreach( "nagios.dat") do |e| next if e =~ /service \{|\}/ if e.strip =~ /(.*?)=(.*)/ data[$1]=$2 end end