unable to parse the content using the regular expression
dudeja.rajat at gmail.com
dudeja.rajat at gmail.com
Thu Sep 25 04:30:41 EDT 2008
Hello,
I've the following results from Difflib.Compare() which I want to parse them
using the regular expression to find out the the values that have changed.
######################################################################
Testing DLL interface
######################################################################
Input File: c:\12.txt
Config File: c:\abc.ini
######################################################################
Results:-
-------
- Analysis Time (Iterations = 1) = 0.0449145s
? ^^ ^
+ Analysis Time (Iterations = 1) = 0.0447347s
? ^^ ^
Width = 0.999989
Height = 0.044
- Length = 10
? ^
+ Length = 11
? ^
End of Results
######################################################################
Testing DOTNET interface
######################################################################
Input File: c:\12.txt
Config File: c:\abc.ini
#######################################################################
Results:-
-------
- Analysis Time (Iterations = 1) = 0.0449145s
? ^^ ^
+ Analysis Time (Iterations = 1) = 0.0447347s
? ^^ ^
Width = 0.999989
Height = 0.044
- Length = 12
? ^
+ Length = 13
? ^
End of Results
******
How Can I extract the headings out of this file? The headings are:
######################################################################
Testing DLL interface
######################################################################
Input File: c:\12.txt
Config File: c:\abc.ini
######################################################################
< Here I want to display only the values that differ i.e. the lines prceded
with +,?,- signs >
######################################################################
Testing DOTNET interface
######################################################################
Input File: c:\12.txt
Config File: c:\abc.ini
#######################################################################
I intent to show only the things that differ with their proper headings(as
above)
Please help me to get the heading stuff out.
Regards,
Rajat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080925/e7edb7b4/attachment.html>
More information about the Python-list
mailing list