Match 2 words in a line of file

elrondrules at gmail.com elrondrules at gmail.com
Thu Jan 18 18:46:47 EST 2007


Hi

Am pretty new to python and hence this question..

I have file with an output of a process. I need to search this file one
line at a time and my pattern is that I am looking for the lines that
has the word 'event' and the word 'new'.

Note that i need lines that has both the words only and not either one
of them..

how do i write a regexp for this.. or better yet shd i even be using
regexp or is there a better way to do this....

thanks




More information about the Python-list mailing list