On Mon, 7 Mar 2011 06:54:30 pm vineeth wrote:
> Hello all I am doing some analysis on my trace file. I am finding the
> lines Recvd-Content and Published-Content. I am able to find those
> lines but the re module as predicted just gives the word that is
> being searched. But I require the entire l
>> import re
>> file = open('file.txt','r')
>> file2 = open('newfile.txt','w')
>>
>> LineFile = ' '
>>
>> for line in file:
>> LineFile += line
>>
>> StripRcvdCnt = re.compile('(P\w+\S\Content|Re\w+\S\Content)')
>>
>> FindRcvdCnt = re.findall(StripRcvdCnt, LineFile)
>>
>> for SrcStr in FindRcvdC
On Mon, Mar 7, 2011 at 1:24 PM, vineeth wrote:
> Hello all I am doing some analysis on my trace file. I am finding the lines
> Recvd-Content and Published-Content. I am able to find those lines but the
> re module as predicted just gives the word that is being searched. But I
> require the entire
Hello all I am doing some analysis on my trace file. I am finding the
lines Recvd-Content and Published-Content. I am able to find those lines
but the re module as predicted just gives the word that is being
searched. But I require the entire line similar to a grep in unix. Can
some one tell m