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
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']
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
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
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