I have a file need to clean,this is the file'content
218.79.251.215 - - [23/May/2006:08:57:44 +0800] "GET /fg172.exe HTTP/1.1" 206 2350253
220.178.150.3 - - [23/May/2006:08:57:40 +0800] "GET /fg172.exe HTTP/1.1" 200 2350253
59.42.2.185 - - [23/May/2006:08:57:52 +0800] "GET /fg172.exe HTTP/1.1" 200 2350253
219.140.190.130 - - [23/May/2006:08:57:59 +0800] "GET /fg172.exe HTTP/1.1" 2002350253
221.228.143.52 - - [23/May/2006:08:58:08 +0800] "GET /fg172.exe HTTP/1.1" 206 719996
221.228.143.52 - - [23/May/2006:08:58:08 +0800] "GET /fg172.exe HTTP/1.1" 206 713242
221.228.143.52 - - [23/May/2006:08:58:09 +0800] "GET /fg172.exe HTTP/1.1" 206 1200250
I just want this part "218.79.251.215".Do you have any idea about how to extract the part that I need from the file?I use the python 2.7.6I am a freshman in python ,and I want resolve the problem by myself.So,if you can give me some advice,not the exact code.I will appreciate for that.
Aucun commentaire:
Enregistrer un commentaire