Re: String split with " and/or ' and/or \

2008-06-24 Thread Kurt Mueller
Peter Otten schrieb: Kurt Mueller wrote: How to (super)split a string (literal) containing " and/or ' and/or \. example: ' a " b b " c\ c '.supersplit(' ') -> ['a', ' b b ', 'c c'] import shlex shlex.split(' a " b b " c\ c ') ['a', ' b b ', 'c c'] Thanks Peter Thanks Paul

Re: String split with " and/or ' and/or \

2008-06-24 Thread Peter Otten
Kurt Mueller wrote: > How to (super)split a string (literal) containing " and/or ' and/or > \. > > example: > > ' a " b b " c\ c '.supersplit(' ') > -> > ['a', ' b b ', 'c c'] > > > Thanks and Grüessli >>> import shlex >>> shlex.split(' a " b b " c\ c ') ['a', ' b b ', 'c c']

Re: String split with " and/or ' and/or \

2008-06-24 Thread Paul McGuire
On Jun 24, 3:56 am, Kurt Mueller <[EMAIL PROTECTED]> wrote: > How to (super)split a string (literal) containing " and/or ' and/or \. > > example: > > ' a  "  b b   "  c\ c '.supersplit(' ') > -> > ['a', '  b b   ', 'c c'] > > Thanks and Grüessli > -- > Kurt Müller: > [EMAIL PROTECTED] Or did you m

Re: String split with " and/or ' and/or \

2008-06-24 Thread Paul McGuire
On Jun 24, 3:56 am, Kurt Mueller <[EMAIL PROTECTED]> wrote: > How to (super)split a string (literal) containing " and/or ' and/or \. > > example: > > ' a  "  b b   "  c\ c '.supersplit(' ') > -> > ['a', '  b b   ', 'c c'] > > Thanks and Grüessli > -- > Kurt Müller: > [EMAIL PROTECTED] >>> re.split

String split with " and/or ' and/or \

2008-06-24 Thread Kurt Mueller
How to (super)split a string (literal) containing " and/or ' and/or \. example: ' a " b b " c\ c '.supersplit(' ') -> ['a', ' b b ', 'c c'] Thanks and Grüessli -- Kurt Müller: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list