Parsing parameters with quotes

Giovanni Bajo noway at
Fri Mar 14 22:13:14 CET 2003

"Sean Ross" <sross at> ha scritto nel messaggio
news:Stbca.910$qc4.102056 at

> Unfortunately, "this is one" still has quotes. so you can do
> >>> seq = p.findall(s)
> >>> q = re.compile(r'"')
> >>> seq = [q.sub('', word) for word in seq]
> >>> seq
> ['foo', 'this is one', 'and, 'this', 'not']

Well, string.strip() is easier here I believe. Anyway, thanks for the help.

Giovanni Bajo

More information about the Python-list mailing list