help with simple regular expression grouping with re

Bob Horvath bob at horvath.com
Fri May 7 23:58:47 EDT 1999


Python gods and godesses,

Being relatively new to Python, I am trying to do something using re and
cannot figure out the right pattern to do what I want.

The input that I am parsing is a typical "mail merge" file, containing
comma separated fields that are surrounded by double quotes.  A typical
line is:

"field 1", "field 2","field 3 has is different, it has an embedded
comma","this one doesn't"

I am trying to get a list of fields that are the strings that are
between the quotes, including any embedded commas.

Can one of you be so kind as to nudge me in the direction of a re
pattern that would work?

Python newbie, but loving it,
Bob





More information about the Python-list mailing list