Match 2 words in a line of file

Alex omniflex at
Sat Jan 20 14:05:31 CET 2007

egc> how do i write a regexp for this.. or better yet shd i even be using
egc> regexp or is there a better way to do this....
"A team of engineers were faced with a problem; they decided to handle
it with regular expressions. Now they had two problems"

Regular expressions are not always the best solution. Others have
pointed out how it can work with "if word in line", this approach will
do if you're dealing with simple cases.

Take a look at this discussion, it is very informative:

More information about the Python-list mailing list