Regular expressions in files
Simon Langley
Simon.Langley at uwe.ac.uk
Fri May 19 09:38:57 EDT 2000
Can regular expression matching be done on files? I'd like to read just
as much of a file as is necessary to either be a (greedy) match of the
re or until a match definitely can't be found.
If a string is read from a file, tried for a match and fails can I tell
whether it failed because a) without reaching the end of the string it
didn't match or b) it didn't match by the end of the string but might
have if the next line had been appended? That would solve the problem.
Thanks,
Simon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Simon Langley
Email: Simon.Langley at uwe.ac.uk
University of the West of England
Bristol BS16 1QY
England
More information about the Python-list
mailing list