■
require 'net/http' Net::HTTP.version_1_2 text = /-->/.match( /<!--/.match( /<!--/.match( Net::HTTP.start('www.pythonchallenge.com', 80) {|http| response = http.get('/pc/def/ocr.html') response.body } ).post_match ).post_match ).pre_match def text.uniq uniq_keys = self.split(//).inject(Hash.new(0)){|h,c| h[c] += 1; h }.to_a.select{|key, count| count == 1 }.collect{|key,count| key }.join self.split(//).select{|node| uniq_keys.include?(node) }.join end p text.uniq