lib/wmap/host_tracker.rb
# Search potential matching sites from the host store by using simple regular expression. Note that any upper-case char in the search string will be automatically converted into lower case
Search potential matching sites from the host store by using simple regular expression. Note that any upper-case char in the search string will be automatically converted into lower case
Search potential matching sites from the host store by using simple regular expression . Note that any upper - case char in the search string will be automatically converted into lower case
def search (pattern)
		puts "Search host store based on the regular expression: #{pattern}" if @verbose
		pattern=pattern.strip.downcase
		results=Array.new
		@known_hosts.keys.map do |key|
			if key =~ /#{pattern}/i
				results.push(key)
			end
		end
		return results
	rescue Exception => ee
		puts "Exception on method #{__method__}: #{ee}"
		return nil
	end
def search ( pattern ) puts "Search host store based on the regular expression: #{pattern}" if @verbose pattern = pattern . strip . downcase results = Array . new @known_hosts . keys . map do | key | if key =~ / #{ pattern } /i results . push ( key ) end end return results rescue Exception => ee puts "Exception on method #{__method__}: #{ee}" return nil end
Search potential matching sites from the host store by using simple regular expression.
Search potential matching sites from the host store by using simple regular expression .
pattern
<not_specific>