File Data Extraction Approach

Jim St.Cyr jstcyr at mediaone.net
Thu Nov 22 20:08:23 EST 2001


Hello-

I have a multiline file of the format:

: Some Name = data : Another Name = data : etc = data:

Each line consists of 20 tagnames and associated data.  Some of the tagnames
have spaces in them though most don't.  There is a space on each side of the
equal sign and on each side of the colon which acts as a field seperator.  I
only need the data associated with 7 out of the 20 tagnames.

I was thinking about removing the whitespace from the line and then seeking
the tagnames that I am interested in.  This strikes me as sort of brute
force and I would like some help in formulating an approach that is a bit
more elegant.

Thank you.

Jim
jstcyr at mediaone.net





More information about the Python-list mailing list