Alex: I tried your suggestion, and I am close, but not quite. What is happening with the number split? Here is my code: import string, sys, os, re if __name__ == "__main__": Max_lines = 7 InputFileName = os.path.join("d:", "programsPython", "test.txt") OutputFileName = os.path.join("d:", "programsPython", "outdata.txt") fout = open(OutputFileName, 'w') fin = open(InputFileName, 'r') number = re.compile(r'\d+\.?d*') rawtext = fin.read() for anumber in number.findall(rawtext): print "Number is: " + repr(anumber) + "\n" fin.close() fout.close() Here is my output: >>> Number is: '4' Number is: '4.' Number is: '00' Number is: '5598' Number is: '80.' Number is: '10' Here is my input file: Min. line width (mils): 4 4.00 mils trace segment count / % of total: 5598/80.10 %
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4