[Tutor] Newbie: Help on comparing files

Isr Gish isrgish at fusemail.com
Wed Jan 7 14:51:36 EST 2004


I looking to write a function to compare 2 files.  
What I want is it should take from first file a certain amount of text. (For example till it reaches 2 end of line marks).  Then it should search the "WHOLE" second file if its there.  If not found in second file, write to new file this text. If found then continue with taking next amount of text from first file.  After the file is finished, any text that's in second file that was not in first file. Should be written to a new file.

IOW, I want to know what's in first file and not in second file. And what's in second that's not in first.

I guess my main question is should I first use Regular Expression to split the files first. Or should I use string methods.

Put any ideas would be appreciated.

Thanks in advance.

---------------
Isr Gish




More information about the Tutor mailing list