splitting using '\' as a delimiter
Felix Meinhold
FelixMeinhold at web.de
Sun Dec 2 19:03:28 EST 2001
> I have strings like this:
>
> string = 'value\key'
>
> that I would like to split. If I try splitting the string like this:
>
> alias = string.split('\\',string)
>
> I get:
>
> alias = ['\']
>
> How can I do this?
>
> Thanks
for me, this works:
import string
buffer = r'value\key'
print string.split(buffer,"\\")
used python 2.1.1 on linux
felix
--
Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
More information about the Python-list
mailing list