Find word

Mikael Olofsson mikael at isy.liu.se
Fri Feb 11 07:24:06 EST 2000


On 11-Feb-00 Pedro Silva wrote:
 >      I have a file, that is a text file that is in teh filesystem. I need to
 >  get some lines in that file, and for that I need to find some words. For
 >  example, in that file     I know that I have the words: From, Subject, Date
 >  and Xref and I need the text that is after this words. 
 >      How can I find these words?

string.find(s,sub[,start[,end]]) is your friend.

/Mikael

-----------------------------------------------------------------------
E-Mail:  Mikael Olofsson <mikael at isy.liu.se>
WWW:     http://www.dtr.isy.liu.se/dtr/staff/mikael
Phone:   +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date:    11-Feb-00
Time:    13:22:10

This message was sent by XF-Mail.
-----------------------------------------------------------------------




More information about the Python-list mailing list