Try regular expression:
http://diveintopython.org/regular_expressions/index.html
Bad example:
import re
infile = open("test.txt","r")
outfile = open('out.txt', 'w')
while True:
text = infile.readline().strip()
if text:
nr = re.findall('[0-9.]+', text)
print nr[1:]
continue
else:
break
infile.close()
-ordi-
Junior Poster in Training
92 posts since Dec 2009
Reputation Points: 18
Solved Threads: 11
or
print re.search(r'name="(.*)"', text)
-ordi-
Junior Poster in Training
92 posts since Dec 2009
Reputation Points: 18
Solved Threads: 11
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852
Mark it solved then as the original poster.
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852