From: Adam Nelreth Date: 2010-03-25T17:16:04+09:00 Subject: hash problem Hi I have small problem with adding data to hash table In loop I take some string and get IP address from it like this: ip = /(?:(?: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) and now under ip variable I have my IP which I want to put in hash table and count if the same IP I will find in another step (loop) I create hash table test = Hash.new and put it in table test[ip] = 1 But I don't know how to search table to find if the same ip is already in table and increase counter Could You tell me how to do this or give me just a clue how to figure this out ? -- Posted via http://www.ruby-forum.com/.