Re: How to Split Chinese Character with backslash representation?

2006-10-29 Thread jim-on-linux
On Friday 27 October 2006 17:21, jim-on-linux wrote: > On Thursday 26 October 2006 23:43, you wrote: > > Hi all, > > > > I was trying to split a string that > > > > represent chinese characters below: > > >>> str = '\xc5\xeb\xc7\xd5\xbc' > > >>> print str2, > > > > ??? > > > > >>> fields2 = split(

Re: How to Split Chinese Character with backslash representation?

2006-10-27 Thread J. Clifford Dyer
Paul McGuire wrote: > "Wijaya Edward" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Hi all, >> >> I was trying to split a string that >> represent chinese characters below: >> >> > str = '\xc5\xeb\xc7\xd5\xbc' > fields2 = split(r'\\',str) > > There are no backslash char

Re: How to Split Chinese Character with backslash representation?

2006-10-27 Thread jim-on-linux
On Thursday 26 October 2006 23:43, you wrote: > Hi all, > > I was trying to split a string that > > represent chinese characters below: > >>> str = '\xc5\xeb\xc7\xd5\xbc' > >>> print str2, > > ??? > > >>> fields2 = split(r'\\',str) > >>> print fields2, > > ['\xc5\xeb\xc7\xd5\xbc'] > > But why the s

Re: How to Split Chinese Character with backslash representation?

2006-10-27 Thread Paul McGuire
"Wijaya Edward" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi all, > > I was trying to split a string that > represent chinese characters below: > > str = '\xc5\xeb\xc7\xd5\xbc' print str2, > ??? fields2 = split(r'\\',str) print fields2, > ['\xc5\xeb\xc7\xd

Re: How to Split Chinese Character with backslash representation?

2006-10-26 Thread limodou
On 10/27/06, Cameron Walsh <[EMAIL PROTECTED]> wrote: > limodou wrote: > > On 10/27/06, Wijaya Edward <[EMAIL PROTECTED]> wrote: > >> > >> Thanks but my intention is to strictly use regex. > >> Since there are separator I need to include as delimiter > >> Especially for the case like this: > >> > >

Re: How to Split Chinese Character with backslash representation?

2006-10-26 Thread Fredrik Lundh
Wijaya Edward wrote: > Since there are separator I need to include as delimiter > Especially for the case like this: > str = '\xc5\xeb\xc7\xd5\xbc--FOO--BAR' field = list(str) print field > ['\xc5', '\xeb', '\xc7', '\xd5', '\xbc', '-', '-', 'F', 'O', 'O', '-', '-', > 'B', 'A', 'R'

Re: How to Split Chinese Character with backslash representation?

2006-10-26 Thread Cameron Walsh
limodou wrote: > On 10/27/06, Wijaya Edward <[EMAIL PROTECTED]> wrote: >> >> Thanks but my intention is to strictly use regex. >> Since there are separator I need to include as delimiter >> Especially for the case like this: >> >> >>> str = '\xc5\xeb\xc7\xd5\xbc--FOO--BAR' >> >>> field = list(str)

Re: How to Split Chinese Character with backslash representation?

2006-10-26 Thread limodou
On 10/27/06, Wijaya Edward <[EMAIL PROTECTED]> wrote: > > Thanks but my intention is to strictly use regex. > Since there are separator I need to include as delimiter > Especially for the case like this: > > >>> str = '\xc5\xeb\xc7\xd5\xbc--FOO--BAR' > >>> field = list(str) > >>> print field > ['\x

RE: How to Split Chinese Character with backslash representation?

2006-10-26 Thread Wijaya Edward
;\xc7', '\xd5', '\xbc','FOO','BAR] What's the best way to do it? -- Edward WIJAYA SINGAPORE From: [EMAIL PROTECTED] on behalf of Cameron Walsh Sent: Fri 10/27/2006 12:03 PM To: python-list@python.org Subject: Re: How to S

Re: How to Split Chinese Character with backslash representation?

2006-10-26 Thread Cameron Walsh
Wijaya Edward wrote: > Hi all, > > I was trying to split a string that > represent chinese characters below: > > str = '\xc5\xeb\xc7\xd5\xbc' print str2, > ??? fields2 = split(r'\\',str) print fields2, > ['\xc5\xeb\xc7\xd5\xbc'] > > But why the split function here doesn't