Reputation: 21
I want to read data from a text file and retrieve just the ip_addresses contained in the file.
The file contains data as:
[#<host:192.168.2.135>, #<host:175.41.142.49>, #<host:20:aa:4b:9b:eb:8c>, #<host:20:7c:8f:10:38:a0>, #<host:192.168.2.1>, #<host:239.255.255.250>]
From these data, i just want the host addresses like 192.168.2.135 and so on and store them in an array.Could somebody please help me with this? Thanks in advance.
Upvotes: 0
Views: 462