python script help
Hey, I am looking to make a program that will delete everything except phrases with a "." in it. I want to do this for this reason. 121.11.70.68:8080 anonymous Aug-24, 07:53 China 204.131.46.200:8000 anonymous proxy server Aug-24, 07:39 United States 218.26.219.188:8080 anonymous Aug-24, 07:42 China 81.192.52.62:80 anonymous proxy Aug-24, 06:06 Morocco 196.26.193.82:8080 anonymous proxy Aug-24, 06:26 South Africa 216.240.136.189:80 anonymous proxy server Aug-24, 06:33 United States
Those are just random fresh proxies. And only the proxies them self have the ".\'s" in them. Therefore a script that loads a list of proxies and then deletes everything without a . in it. Anyone know an easy route? I am guessing this is fairly or extremely easy.
You are right, this task is easy. You could use regular expressions or if you want to keep it simple, just use some basic string functions to parse the code.
Notice the meat that you want only consists of numbers, 3 periods ('full stops' if you are not an american xD), and a colon? Use that to try figure out how to parse the text. If you get stuck, send me what you have got and I'll help you along.