help splitting strings

Michael Gilfix mgilfix at eecs.tufts.edu
Fri Apr 19 01:24:24 EDT 2002


  Ah. I wasn't aware of the CSV module and what it did.
Seems like good advice.

            -- Mike

On Thu, Apr 18 @ 17:17, John Machin wrote:
> Michael Gilfix <mgilfix at eecs.tufts.edu> wrote in message news:<mailman.1019147737.28803.python-list at python.org>...
> > You definitely want to use the re module and finall
> > here.  That way you can have tighter control over what
> > constitutes a field.  The difficulty here is crafting your
> > regular expression so it matches what you want. 
> > 
> 
> Sorry to be flatly contradictory, but you definitely *don't* want
> to use regular expressions to try to unravel CSV format, whether (de
> facto) standard or not. Therein lie both madness and slow processing.
> Take Emile's advice and use Dave Cole's CSV module. If you have data
> that it doesn't handle (i.e. not "standard") then post again or send
> me e-mail -- I am lashing together a module that handles non-standard
> variations of CSV format.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
`-> (sjmachin)

-- 
Michael Gilfix
mgilfix at eecs.tufts.edu

For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html





More information about the Python-list mailing list