[Tutor] Help with regular expression

Steven D'Aprano steve at pearwood.info
Sun Apr 15 10:36:16 CEST 2012


syed zaidi wrote:
> 
> Dear all Can someone please tell me how to solve the following problem.  I
> have developed a python code to extract specific information from more than
> 1000 files which have slightly different format. The problem I am facing is
> that I have to develop specific RE for each of the file which is very
> difficult when it comes to handle 1000s of files. can someone please tell
> me how to solve this problem. 


Change the files so that they all have the same format.

Without knowing what the format is, how it differs from file to file, and what 
RE you use, what sort of answer did you expect?


-- 
Steven



More information about the Tutor mailing list