1
0 Comments

I have a document called file.txt that holds some information:

[{"84.15.160.174:4145":"178.208.17.195:9999"},
{"84.15.160.174:4145":"58.253.154.117:9999"},
{"84.15.160.174:4145":"112.87.71.194:9999"},
{"84.15.160.174:4145":"185.103.88.103:38692"}]

My goal is to extract IP addresses along with their ports from a text file named ip.txt. The IP addresses and ports are enclosed within quotation marks, and I would like to filter them one by one, line by line. Although I have given an example of 8 IP addresses and ports, the actual number may range from 50 to 100.

Regardless of the number, my objective is to extract the IP addresses and ports enclosed in quotation marks, one per line.

Askify Moderator Edited question April 24, 2023