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


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