Alessio wrote: > I used readlines() to read my text file, then with a for cicle I > extract line by line the substrings I need by regular expressions Just in case you didn't know: for line in instream: ... looks better, uses less memory, and may be a tad faster than for line in instream.readlines(): ... Peter