On Tue, Jan 08, 2002 at 02:50:16PM -0500, Jeff 'japhy' Pinyan wrote:
> On Jan 8, Yitzchak Scott-Thoennes said:
> 
> >A file has 0 or more fields on each line.
> >Fields are separated by 1 or more whitespace characters.
> >Leading and trailing whitespace should be ignored.
> >Comments (starting with # and continuing to the end of the line) should
> >be ignored.
> >A field may have surrounding double-quotes.  Such a field may contain # or
> >whitespace (but not ").  The surrounding quotes are themselves not part of
> >the field.  Any other use of a " has no special meaning (e.g.:
> >howdy, "partner# foo
> >is a line with two fields, 'howdy,' and '"partner').
> >
> >Read the file and print the fields of each line separated by ':'.
> 
> My code is below.
> 

Those solutions don't quite work, because they include the surrounding
double quotes as part of the field in the output.  According to the
description, the surrounding quotes are not part of the actual field.

Ronald

Reply via email to