Re: string replace
- From: Schüle Daniel <uval@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 16:12:51 +0200
A solution could be that "replace" accept a tuple/list of chars, like
that was add into the new 2.5 for startswith.
I don't know, but can be this feature included into a future python release?
I don't know, but I think it would be useful
as for now I use this
>>> import re
>>> chars = re.compile(r'[abc]')
>>> text = "aAbBcCdD"
>>> chars.sub("",text)
'ABCdD'
>>>
Thanks,
Michele
Regards, Daniel
.
- References:
- string replace
- From: Michele Petrazzo
- string replace
- Prev by Date: RE: string replace
- Next by Date: Re: Icono en wxpython
- Previous by thread: string replace
- Next by thread: Re: string replace
- Index(es):