From: Adam Nelreth Date: 2010-03-25T19:53:03+09:00 Subject: Re: hash problem Robert Klemme wrote: > 2010/3/25 Adam Nelreth : >>>>> if h.has_key?("1.2.3.4") >>> In table. >> >> /(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/.match(title) >> like I need - maybe there is problem with "" or '' because I don't set >> it when I put key to hash table > > ip is of type MatchData. What you want is a String. > > irb(main):001:0> ip = "foo".match /o+/ > => # > irb(main):002:0> ip[0] > => "oo" > > Kind regards > > robert Yes - MatchData - the problem is solved :) Thanks for all -- Posted via http://www.ruby-forum.com/.