Re: 请问一个正则的问题
shhgs <[email protected]>
| Newsgroups | gmane.comp.python.chinese |
|---|---|
| Message-ID | <[email protected]> |
"(aaa)(bbb)(ccc)".replace('(', ' ').replace(')', ' ').split()
2008/1/17 cunheise <[email protected]>:
>
> print str[1:-1].split(')(')
>
>
> > Date: Thu, 17 Jan 2008 15:22:15 +0800
> > From: [email protected]
> > To: [email protected]
> > Subject: Re: [python-chinese] 请问一个正则的问题
>
>
> >
> > s[1:len(s)-1].split(')(')
> > huang falls wrote:
> > > Hello !
> > >
> > > str="(aaa)(bbb)(ccc)"
> > >
> > > 想将其转成一个list :
> > >
> > > [ "aaa", "bbb", "ccc" ]
> > >
> > > 请问如何做比较合适?
> > >
> > > Thanks!
> > >
> > > Regards
> > > Falls
> > > _______________________________________________
> > > python-chinese
> > > Post: send [email protected]
> > > Subscribe: send subscribe to [email protected]
> > > Unsubscribe: send unsubscribe to [email protected]
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
> > _______________________________________________
> > python-chinese
> > Post: send [email protected]
> > Subscribe: send subscribe to [email protected]
> > Unsubscribe: send unsubscribe to [email protected]
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
>
> ________________________________
> "七件武器,七种完美" 立刻体验!
> _______________________________________________
> python-chinese
> Post: send [email protected]
> Subscribe: send subscribe to [email protected]
> Unsubscribe: send unsubscribe to [email protected]
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
_______________________________________________
python-chinese
Post: send [email protected]
Subscribe: send subscribe to [email protected]
Unsubscribe: send unsubscribe to [email protected]
Detail Info: http://python.cn/mailman/listinfo/python-chinese